-
Notifications
You must be signed in to change notification settings - Fork 6
Getting started
Application is configured through environment variables
Pre-configured environment variables are available in the .envrc file. Use it to configure your application during development
.envrc files are automatically loaded by direnv. I strongly recommand installing it, along with its shell hook, to have an isolated development environment
If, for any reason, you don't want to / you can't use direnv, simply
source .envrc
to load environment variables into your shell
To launch the project in development mode
- Make sure the .envrc is loaded
- Install dependencies with
npm install
- If no database is running, simply launch one locally with
npm run dev:db
- Run
npm run dev
The development mode will continuously watch your files to reload the API as you code, and will even regenerate the ORM on schema's changes!
The whole containerized stack can be launched with docker-compose
Run docker-compose up --build
to launch redis, the database and the API connected altogether, or specify which service you desire
Environment variables are forwarded in containers, so don't forget to change sensitive informations such as root credentials
Database is made persistent through a docker volume
If you need to scale this API, have a look at ops-template
It provides a full Kubernetes infrastructure for the API-template, along with monitoring, SSL, alerting, and a lot more