Hlambda is the implementation of the idea to load your ECMAScript code as configuration (metadata). With Hlambda you can easily create microservice that can load arbitary code configuration.
Main usecase was to implement microservice that will run Hasura custom actions in a separate container. Hlambda is supposed to be used in combination with Hasura and Postgres but it can be used as stand alone API server.
Change the admin_secret in the config.yaml manually or just run:
$ hlambda config save --admin-secret "demo"
this will edit the config.yaml file and save admin secret value in that file (please take extra care when commiting config.yaml file to not leak secrets)
(Optionaly) You can check the structure of the initial demo codebase or edit any part of the code with "Visual Studio Code" before deploying(applying metadata) by running:
$ code .
You can now apply the changes by running:
$ hlambda metadata apply
Done! You can use curl to test the API or even better hlambda cli for the simple test:
$ hlambda request get demo
$ curl -s -X GET http://localhost:8081/demo
you can also get the remote logs by running:
$ hlambda server logs
or with aliases
$ hlambda s l
If you want to check your new API in browser just run: