dkzhen
v1.1.4
Published
Repo untuk test backend MSIB batch 6
Downloads
3
Maintainers
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
https://github.com/dkzhen/backend-api-sequelize
install library
npm install sequelize sequelize-cli express body-parser cors dotenv mysql2
add .env
PORT = 5000
HOST = "127.0.0.1"
USER = "root"
PASSWORD =
import database
SQL file on utils/store.sql
Run
npm run dev
Routes
Products
GET : /api/products
GET : /api/products?sort=price&order=asc
POST : /api/products
PUT : /api/products/:id
DELETE : /api/products/:id
Categories
GET : /api/categories
POST : /api/categories
PUT : /api/categories/:id
DELETE : /api/categories/:id
Product Assets
GET : /api/product-assets
POST : /api/product-assets
PUT : /api/product-assets/:id
DELETE : /api/product-assets/:id