DB_NAME=tour # change to your db name DB_USER=root # change to your db user DB_PASSWORD=admin # your db password HOST=localhost # your host DIALECT=mysql # database schema mysql for sequelize PORT=7000 # port of your choice
npm i
npm run start
npm run dev
replace with your choice port currently it localhost:7000
http://localhost:/api/users/create
require params in req.body
1: username
2: password
http://localhost:/api/users/all
no params required
get all users
http://localhost:/api/roles/create
send params in req.body
1: userId
2: roleId
http://localhost:/api/roles/all
no params required
get all roles
http://localhost:/api/permissions/create
send params in req.body
1: title
2: modelType
3: method
http://localhost:/api/permissions/all
no params required
get all permissions
http://localhost:/api/user-roles/create
send params in req.body
1: userId
2: roleId
http://localhost:/api/user-roles/all
no params required
get all user roles
http://localhost:/api/roles-permission/create
send params in req.body
1: roleId
2: permissionId
http://localhost:/api/roles-permission/all
no params required
get all user roles permission