This is the API
for the YouCanBenefit
project.
npm run prestart:prod
npm run start:prod
- one should use a process management tool
http get localhost:3000/data/init
- this will create and map required elasticsearch indices
docker build -t youcanbenefit-api .
docker run -p 3000:3000 youcanebenfit-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.