PMIS
is NodeJS Backend Project Develop for CMG.It facilitate to register user
and login user within secured environment.
- Node JS Environment
- MYSQL
- Command Prompt or VS Code
- Postman
If you would still prefer to do the installation manually, follow these steps:
git clone https://github.com/DDSameera/node_project_mis.git
cd node_project_mis
npm install
npm audit fix
Rename config.example
folder into config
Go to config
folder & Add your own keys .
Example
authConfig.encryptorSecretKey = '393a41d556f3d8164a1520f2fb30795d';
authConfig.jwtTokenKey = 'abc123456789010012134214252';
authConfig.jwtTokenExpireTime = 1800; //(30 mins)
......
"development": {
"username": "xxxxxxxxxxxxxxxxxx", // Default : root
"password": "xxxxxxxxxxxxxxxxxx",// Default : null
"database": "xxxxxxxxxxxxxxxx",// Default : node_product_mis
"host": "127.0.0.1",
"dialect": "mysql"
},
......
serverConfigs.port = 3000;
Create new database (Eg : node_product_mis
)
sequelize-cli db:migrate
sequelize db:seed:all
nodemon server.js
- Open Postman
- Go to Main Menu > File > Import
- Go to Link Tab
- Enter Url :
https://www.postman.com/collections/176ec8faf5977d317299
- Click Continue button
- Click Import
That's all
- Secure API Authentication with JWT Token
- Secured Routes For Product Category
- Quick Database Migrations
- Fastest Validations
- Prevent SQL Injections from Sequelize ORM
- Unique Secured Token Valid only for specific time period
src\
|--config.example\ # Configuration related things,User should have to rename it config
|--controllers\ # Route controllers (controller layer)
|--middlewares\ # Custom express middlewares
|--migrations\ # Database Migrations
|--models\ # MYSQL models
|--routes\ # Routes
|--seeders\ # Fake DB Data for testing purpose
|--services\ # Business logic (service layer)
|--validations\ # Request data validation schemas
.gitignore # Skip Git Uploads
.package.json # Node Dependency Management
.package-lock.json # Specific Node Libraries
README.md # Documentation
server.js # App Entry point