This application is a e-commerce products management tool designed to assist seller or e-commerce in tracking products data. The application encompasses four main functions: viewing a list of products, adding new products, editing existing product data, and deleting selected product.
- Search Product List: Display a complete list of products with product's ID, product's name, and product's description.
- Add New Product: Add new product with name, description and product's rating.
- Edit/Update product Data: Modify existing product data, including name and description.
- Delete Products: Remove existing product entries from the list.
Before getting started, make sure you have met the following requirements:
- Node.js is installed on your computer.
- PostgreSQL database is configured and running. Update the database configuration in
knexfile.js
if necessary. you can see my knexfile.js for see my data base and you can change - if you "change" data base don't forget to running migrations and seed
- first running migration: npx knex migrate:latest
- second running Seed : npx knex seed:run
Terminal Bash:
- git clone https://github.com/San033/e-commerce.git
- cd e-commerce
- npm install
- cd e-commerce
- npm run start The server will run on http://localhost:3000.
- open another terminal
- npm run serve Open your browser and access the frontend at http://localhost:5000. You can click "Product" for see product menu
The following API endpoints are available:\
- POST /products/create: Create new product.
- GET /products/all: Get all products list available.
- PUT /products/update/:id: Update a product by ID.
- DELETE /product/delete:id: Delete a product by ID. You can use these endpoints to interact with the product data.