https://github.com/hueter/docker-node-express-boilerplate
Node version used: 16.18.1
- Run
docker-compose up
to start three containers:- Mongo container
- Node.js app container
- NGINX proxy container
- Server is accessible at
http://localhost:8080
GET https://collectiontrackerapi.lat/collectives
https://collectiontrackerapi.lat/api-docs/
Use LTS version of Node
npm install
followed by npm test
to run everything
./app
handlers
are Express.js route handlers that haverequest
,response
, andnext
parameters.helpers
are raw JS "classes" and utility functions for use across the appmodels
are Mongoose schema definitions and associated modelsrouters
are RESTful route declarations using express.Router module that utilize the functions inhandlers
dtos
are JSONSchema validation schemas for creating or updating an Entity.app.js
is what builds and configures the express appconfig.js
is the app-specific config that you will want to customize for your appindex.js
is the entrypoint that actually starts the Express server
./config
- config contains NGINX proxy configuration, the production pm2 configuration (the process-runner of choice), and the Jest configuration to run MongoDB in memory