In this repository, this is a backend for janfir-store (frontend). This is based API for janfir-store
To get the Node server running locally:
- Clone this repo with
git clone https://github.com/vigarp/janfir-api.git janfir-api
cd janfir-api
npm install
to install all required dependencies- Create a
.env
file and add following:
DB_HOST = yourlocalhost
DB_USER = yourdbuser
DB_PASSWORD = yourdbpassword
DB_NAME = janfir_db
REACT_APP_URL_FRONTEND = http://localhost:3000
BASE_URL = http://localhost:4001
-
Import and use database dump file
janfir_db.sql
from this directory to your MySQL rdbms, (via terminal or MySQL Workbench): -
node index.js or npm run dev if nodemon installed in your computer
to start the local server
The architechture to created this project:
- Database MySQL
- Node JS
- Express JS ( Framework )
items endpoint
GET /
get all items
GET /:id
detail items
POST /
create an item
DELETE /:id
delete an item
PUT /:id
edit an item
Documentation : Postman Documentation