Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rezapfebriyan/expressjs-multi-role
Restful CRUD upload file and multi Role app using Express JS and MySQL
https://github.com/rezapfebriyan/expressjs-multi-role
expressjs mysql-database nodejs restfulapi
Last synced: 5 days ago
JSON representation
Restful CRUD upload file and multi Role app using Express JS and MySQL
- Host: GitHub
- URL: https://github.com/rezapfebriyan/expressjs-multi-role
- Owner: rezapfebriyan
- Created: 2023-01-08T14:51:30.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2023-11-06T13:09:21.000Z (about 1 year ago)
- Last Synced: 2023-11-07T13:45:30.352Z (about 1 year ago)
- Topics: expressjs, mysql-database, nodejs, restfulapi
- Language: JavaScript
- Homepage:
- Size: 4.35 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### expressJS-multi-role
*Restful CRUD and multi Role app using Express JS and MySQL*### Getting Start Guide
Clone this repo to your local computer.- copy the **.env.example** file, then paste and delete the .example so it becomes an **.env** file.
- fill the port and secret session data in the **.env** file as you wish.
- set up the database according to what is in your local database in the **config/Database.js** file.
- Run the command bellow to install package dependencies (get node_modules)
```sh
npm install
```
- in the **model/User.js** file, uncomment the script on lines 50 to 55, then run the command below (for generate the table User automatically):
```sh
node models/User.js
```
- do the same thing in the **model/Product.js** file to generate the Product table, run command bellow:
```sh
node models/Product.js
```
- in the **index.js** file uncomment the script on line 36, then run the command bellow (for generate the table Session automatically):
```sh
node index.js
```
*After it has been successfully generated, comment back on the script on the three files*Run the command bellow
```sh
nodemon index
```
**The app ready to use**