- express
- dotenv
- path
- fs
- axios / request-native-promise
- moment
- body-parser
- cron
- lodash
- validator
- nodemailer
- mongoose
- connect-mongo
- express-session
- bcrypt [Check if it's depricated]
- cookieParser
- jsonwebtoken
- passport/passport-facebook/passport-jwt/passport-local
- cors / helmet
ββ π .vscode [optional]
| ββ π settings.json [optional]
| ββ π launch.json [optional]
|
ββ π node_modules (auto-generate)
|
ββ π server
| ββ π api
| | ββ π user
| | | ββ π β index.js
| | | ββ π user.routes.js
| | | ββ π user.model.js
| | | ββ π user.controller.js
| | | ββ π user.service.js
| | βββ ...
| |
| ββ π server.js
| ββ π router.js
| βββπ services
| ββ π logger.js
| ββ π dbconfig.js
| ββ π [mostly singleton modules, services, mailer, middleware, varibales]
|
|
ββπ public
| ββπ views [.ejs, .html, .pug...]
| ββπ scripts [frontend javascript files .js ]
| ββπ stylesheets [.css, less. cess...]
| ββπ images
| ββπ assets [optional][media: files, audio, video...]
|
ββ π .eslintrc.json / .eslintrc.js
ββ π .package.json
ββ π .package-lock.json (auto-generate)
ββ π .gitignore
ββ π .env (.staging.env && .production.env)
ββ π Procfile (if you are deploying on heroku)
ββ π README.md
<something>.routes.js
- routers<something>.model.js
- DB collection<something>.controller.js
- logic<something>.services.js
- queries
/**
*@description
*@return
*@params
*/
const functionName = [async]() => { };
Swagger configuration is in the server/services/swagger
folder
All documentation will be parsed from server/services/swagger/docs
and name must finished with .swagger.js
Currently in logger.js I use winston logger