comman-nodejs-mongodb-code
v1.0.0
Published
Scaffold a ready-to-use Node.js + Express + MongoDB project structure with auth, JWT, Swagger and more.
Maintainers
Readme
comman-nodejs-mongodb-code
Scaffold a ready-to-use Node.js + Express + MongoDB project structure (auth, JWT, Joi validation, Swagger, mailer, file uploads) with a single command.
Usage
# create a new folder named my-app
npx comman-nodejs-mongodb-code my-app
# or scaffold into the current (empty) folder
npx comman-nodejs-mongodb-code .After scaffolding
cd my-app
cp .env.example .env # fill in your MongoDB URL, JWT secrets, etc.
npm install
npm startThe server starts on the port defined in your .env (default http://localhost:4000).
What you get
my-app/
├── index.js # app entry (Express + Mongo connection)
├── model/ # Mongoose models
├── routes/ # route registration
├── src/
│ ├── auth/ # auth controller / router / services / dto
│ ├── user/ # user module
│ └── comman/ # shared config, helpers, middleware
├── swagger.yaml
├── .babelrc
├── nodemon.json
└── .env.example