- NodeJS (latest)
https://nodejs.org/en/download/current/
- MongoDB (latest)
https://www.mongodb.com/download-center/community
- Yarn
npm i -g yarn
- Nodemon
npm i -g nodemon
yarn && yarn upgrade
- Generate localhost certs at
certification
folder:
openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' \
-keyout certification/localhost-privkey.pem -out certification/localhost-cert.pem
-
Development:
yarn dev
- Runs API server with nodemon and remote debuggeryarn test
- Same as above, includes automated testing
-
Production:
yarn prod
- Runs API server without logging
https://localhost/docs
- Or just visit
https://localhost
and click on 'DOCUMENTATION' url.
services/*.mjs
- Services connecting everything together.config/default.mjs
- Default configuration for all environments.config/env.*.mjs
- Environment specific configuration.models/*.mjs
- mongoose models.models/functions/*.fn.mjs
- mongoose model functions.config/routes.mjs
- Routes.controls/*.ctrl.mjs
- Route controls.middlewares/*.mjs
- Control middlewares.tests/*.test.mjs
- Tests.client/*
- Static PWA (WIP).
New tests, controls, middlewares and models must be imported/exported at respective folders index.mjs
file