Note: This has been moved to https://github.com/bedrockio/bedrock-core
package.json
- Configure dependenciesconfig/defaults.json
- Default configuration, all values can be controlled via env varsconfig/custom-environment-variables.json
- Overwrite configuration with defined environment variablessrc/*/__tests__
- Unit testssrc/index.js
- Entrypoint for running and binding APIsrc/lib
- Library files like utils etcsrc/v1
- Routessrc/middlewares
- Middleware libssrc/models
- Models for ORM (Mongoose)src/app.js
- Entrypoint into API (does not bind, so can be used in unit tests)src/index.js
- Launch script for the API)emails/dist
- Prebuild emails templates (dont modify => modify emails/src and runnpm run emails
)emails/src
- Emails templates
npm install
npm test
Code reload using nodemon:
npm run dev
All values in config/defaults.json
can be overwritten using environment variables by updating
custom-environnment-variables.json see
node-config
API_BIND_HOST
- Host to bind to, defaults to"0.0.0.0"
API_BIND_PORT
- Port to bind to, defaults to3005
API_MONGO_URI
- MongoDB URI to connect to, defaults tomongodb://localhost/skeleton_prod
API_JWT_SECRET
- JWT secret for authentication, defaults to[change me]
API_ADMIN_EMAIL
- Default root admin useradmin@skeleton.ai
API_ADMIN_PASSWORD
- Default root admin password[change me]
API_APP_NAME
- DefaultSkeleton
to used in emailsAPI_APP_URL
- URL for app defaults tohttp://localhost:3001
API_APP_ADMIN_URL
- URL for admin app defaults tohttp://localhost:3002
API_POSTMARK_FROM
- Reply email addressno-reply@skeleton.ai
API_POSTMARK_APIKEY
- APIKey for Postmark[change me]
docker build -t node-api-skeleton .
- Email template improvements
- Emails tests
- Admin API