api-bot-jnao

1.1.5 • Public • Published

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

Package Sidebar

Install

npm i api-bot-jnao

Weekly Downloads

0

Version

1.1.5

License

ISC

Unpacked Size

333 kB

Total Files

18

Last publish

Collaborators

  • dkzhen