https://github.com/dkzhen/backend-api-sequelize
Rest Api Express Sequelize
https://github.com/dkzhen/backend-api-sequelize
Last synced: about 1 year ago
JSON representation
Rest Api Express Sequelize
- Host: GitHub
- URL: https://github.com/dkzhen/backend-api-sequelize
- Owner: dkzhen
- Created: 2024-01-05T08:57:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-14T04:31:19.000Z (about 2 years ago)
- Last Synced: 2025-03-02T10:35:03.775Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://bc2-msib6.zhen.lat
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Backend REST API - ExpressJS Sequelize ORM
Repo untuk test backend MSIB batch 6
## Instalasi
Instruksi langkah demi langkah tentang cara menginstal proyek ini. Termasuk prasyarat sistem dan langkah-langkah instalasi yang dibutuhkan.
> [!IMPORTANT]
> Node.js
> MYSQL
### clone repository
```console
https://github.com/dkzhen/backend-api-sequelize
```
### install library
```console
npm install sequelize sequelize-cli express body-parser cors dotenv mysql2
```
### add .env
```console
PORT = 5000
HOST = "127.0.0.1"
USER = "root"
PASSWORD =
```
### import database
```console
SQL file on utils/store.sql
```
### Run
```console
npm run dev
```
## Routes
### Products
```console
GET : /api/products
GET : /api/products?sort=price&order=asc
POST : /api/products
PUT : /api/products/:id
DELETE : /api/products/:id
```
### Categories
```console
GET : /api/categories
POST : /api/categories
PUT : /api/categories/:id
DELETE : /api/categories/:id
```
### Product Assets
```console
GET : /api/product-assets
POST : /api/product-assets
PUT : /api/product-assets/:id
DELETE : /api/product-assets/:id
```