This is the API for the YouCanBenefit project.
npm run prestart:prodnpm run start:prod- one should use a process management tool
http POST localhost:3000/data/init- this will create and map required elasticsearch indices
docker build -t youcanbenefit-api .docker run -p 3000:3000 youcanbenefit-api
intended usage
check the deploy repository
It has three accessible routes:
/protected/.../api/.../data/...
There is no authentication service provided.
Since this is a small single tenant application auth is very
straightforward. My implementation is a reverse proxy that
handles basic auth and forwards the request. See the Caddyfile in the deploy repo.
src/modules/constants.readonly.ts is where the environment variables are interpreted.