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