This hyper63 client is an opinionated client that provides a wrapper for data, cache and search apis. The api takes an app name, key name, secret, and url for your hyper63 service. The app name is passed as the sub in the generated access token, which will show through on the logs.
In your API project directory run npm install
For best results, we recommend you consider using crocks as a per utility library with the client. The client currently return the Async data type when you make calls for extensibility.
NOTE: If you prefer async/await or promise patterns, you can simply use the toPromise() method to return a promise instead of an Async.
When creating the client you need to supply the client with four parameters:
- URL - the url to the hyper63 service
- APP_NAME - the name of the app
- SECRET - the shared secret used to generate the JWT Tokens for accessing the service.
- KEY_NAME - this key name is the name of the data store, cache store and search store.
TIP: your key name is the name of the store, cache, and index, you can name it differently for each environment, like stuff-dev, stuff-test, stuff-prod.
When using the client you will want to make sure your data, cache and search stores are setup.
These commands are idempotent which means that the first time they run they will create the data, cache, and search containers, but if the containers already exist then they will simply return an ok. This way you can init your containers every time your service is launched and you don't have to worry about it.
- data.create - creates a new document in the data store
- data.get - retrieves a document from the data store
- data.update - updates a document in the data store
- data.remove - removes a document in the data store
- data. query - runs a query against the data in the store
- data.list - lists the data in the store
- data.bulk - bulk insert./update documents in store
- cache.post - caches a new document
- cache.get - gets a document from the cache
- cache.put - updates a document
- cache.query - returns a list of documents based on a pattern matcher
- cache.remove - removes a document from the cache
- search.create - indexes a search document
- search.remove - removes a search document
- search.query - runs a search and returns matches
Need specific help? you can always reach out to our support team for any additional assistance at