Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gulalicelik/nodejs-express-sequelize-mysql-api-boilerplate
Node.js-Express-Sequelize-PM2-MySQL-API Boilerplate is a pre-configured template for building web applications based on Node.js. This project is created to help API developers save time.
https://github.com/gulalicelik/nodejs-express-sequelize-mysql-api-boilerplate
api api-rest exprees mysql node-express-boilerplate node-express-mysql nodejs
Last synced: 9 days ago
JSON representation
Node.js-Express-Sequelize-PM2-MySQL-API Boilerplate is a pre-configured template for building web applications based on Node.js. This project is created to help API developers save time.
- Host: GitHub
- URL: https://github.com/gulalicelik/nodejs-express-sequelize-mysql-api-boilerplate
- Owner: gulalicelik
- Created: 2023-03-25T15:18:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-17T12:32:08.000Z (6 months ago)
- Last Synced: 2025-01-16T07:52:30.491Z (10 days ago)
- Topics: api, api-rest, exprees, mysql, node-express-boilerplate, node-express-mysql, nodejs
- Language: JavaScript
- Homepage:
- Size: 139 KB
- Stars: 24
- Watchers: 2
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# nodejs-express-mysql-api-boilerplate
a simple boilerplate for nodejs express mysql api
clone this repo and start your project## Installation
```bash
npx @gulali/nodejs-express-sequelize-mysql-api-boilerplate my-project-api
```## Usage
### Database configuration
edit config/config.json file and change your database name, username and password
```bash
{
"development": {
"username": "root",
"password": "",
"database": "api_db_development",
"host": "127.0.0.1",
"dialect": "mysql"
},
"test": {
"username": "root",
"password": "",
"database": "api_db_test",
"host": "127.0.0.1",
"dialect": "mysql"
},
"production": {
"username": "root",
"password": "",
"database": "api_db_production",
"host": "127.0.0.1",
"dialect": "mysql"
}
}```
and run this command to create database and tables
```bash
npm run prepare
```### Run the project
```bash
npm run start:dev
```## Model Generation
```bash
npx sequelize-cli model:generate --name user --attributes firstname:string,lastname:string,username:string,email:string,password:string,gender:string,active:integer,deleted:integer,token:string,token_expire:string,birthday:date,role:string
```## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.