Sample app that demonstrates how to use TypeDB + LocalStack, to develop and test cloud applications locally.
- Docker
- LocalStack Pro (free trial available here)
localstack
CLIterraform
CLInode
/npm
(for Web UI)
To enable the TypeDB extension in LocalStack, use this command:
$ localstack extensions install "git+https://github.com/whummer/localstack-utils.git#egg=localstack-typedb&subdirectory=localstack-typedb"
$ DOCKER_FLAGS='-e TYPEDB_FLAGS=--development-mode.enabled=true' localstack start
(Note: developers of this repo should set the development mode flag to true to disable TypeDB's analytics)
Mac users may need to also run
$ sudo /Applications/Docker.app/Contents/MacOS/install vmnetd
To deploy the sample app to LocalStack, run the following make
target:
$ make tf-deploy
Once the app is deployed, we can run some HTTP requests against the local API Gateway, which spawns a local Lambda function, and interacts with local TypeDB:
$ make requests
The project ships with a simple Web application, which can be spun up on http://localhost:3000
via this command:
$ make web-ui
The code in this repo is available under the Apache 2.0 license.