This is a simple application CRUD. Built with NodeJs using the ExpressJs Framework. Express.js is a web application framework for Node.js. More about Express
- Open app's directory in CMD or Terminal
- Type
npm install
- Turn on Web Server and MySQL can using Third-party tool like xampp, etc.
- Create a database with the name ecommerce, and create table items
- Open Postman desktop application or Chrome web app extension that has installed before
- Choose HTTP Method and enter request url.(ex. localhost:8080/)
- You can see all the end point here
1. GET
-
/items
(Get all data from items) -
/items/:id
(Get all data from specific id) -
/category
(Get all data from category) -
/category/:id
(Get all data from specific id) -
/sub-category
(Get all data from sub-category) -
/sub-category/:id
(Get all data from specific id) -
/cart
(Get all data from cart)
2. POST
-
/items
(Create data item and post to database) -
/category
(Create data category and post to database) -
/sub-category
(Create data sub-category and post to database) -
/cart
(Create data cart and post to database)
3. PUT
-
/items/:id
(Update all data by spesific id) -
/category/:id
(Update all data category by spesific id) -
/sub-category/:id
(Update all data sub-category by spesific id)
4. PATCH
-
/items/:id
(Update some data item by spesific id) -
/cart/:id
(Update some data cart by spesific id)
5. DELETE
-
/items/:id
(Delete items by id) -
/category/:id
(Delete category by id) -
/sub-category/:id
(Delete sub-category by id) -
/cart/:id
(Delete cart by id)