2.0.7 β’ Published 2 years ago
add-express v2.0.7
Introduce π
add-express is a small scaffolding for quickly building express services.
integration with express Mysql MongoDB
Use π¨
Global installation
npm i add-express -g
In the directory you want to create
add-express
go to the ../project/config/default.json change mysql user and password and database name after modification
npm start
Built-in register login testislogin and "/" request
baseUrl=" localhost: your port ";
// /
/
body:none
----------------------------------------------
//register POST
/user
body:{
"username":"2",
"password":"2"
}
----------------------------------------------
//login GET
/login
body:{
"username":"2",
"password":"2"
}
----------------------------------------------
//testislogin GET
/login/islogin
header:{
"Authorization": "in login returned token"
}
You can also import postman.json Changing the baseURL
File π
add-express
ββ config # Default configuration file
ββ key # Asymmetric encryption key
ββ node_module # node package
ββ src
β ββ app # express mysql mongodb jwt deploy
β ββ controller
β ββ middleware
β ββ mongodb # mongodb schema
β ββ router
β ββ service # mysql service
β ββ utils
β ββ main.js
ββ .gitignore
ββ package.json
ββ package-lock.json
ββ postman.json
ββ README.md
author
π€ Loveyless
- Nationality: Chinese
- Github: @loveyless