Webserver for Halo 3
- Install dependencies with the
npm installcommand. - Prepare create a
settings.jsonfile in the project root, following this structure:
API_PORT=8080
MONGO_URI- Build the web service with the
npm run buildcommand. - Run migrations to ensure your database is up to date, using
npm run migrate. - If you wish to insert test data, use the
npm run seedcommand.
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod- Run the
npm run build:dockercommand to build the docker container. - Run the
npm run start:dockercommand to compose and start.
In the case of port conflicts, review/edit the docker-compose.yml file accordingly.
The docker container is built with seeding for demo purposes. If desired this can be removed from the Dockerfile.
Once the app is running, swagger documentation can be found at the /api route. eg. if you are running the web service locally, navigate to http://localhost:8080/api
Last Updated 13/08/22 by Codie Stella 🐧