Node.JS API for the fmk-dosis-til-tekst-ts component
This project exposes an API that calls the fmk-dosis-til-tekst-ts library.
- Node.js latest version
- set environment variable
NODE_ENV=development
. This is the default value if the variable is not set - run
npm install
in the terminal - run
npm run dev
in the terminal, which should result in:
Server is running on port 8000.
- set environment variable
NODE_ENV=production
- run
npm install --omit=dev
in the terminal - run
npm run start
in the terminal, which should result in:
Server is running on port 8000.
-
The API should now be accessible at
http://localhost:8000/<endpoint>
. -
Health check available at http://localhost:8000/health.
-
Swagger docs available at http://localhost:8000/docs.
- run
npm run swagger
in the terminal
The file swagger.json
is created or updated at src/swagger.json.
- run
npm run eslint
in the terminal
The linter reports any errors.