An api used to manage categories of products, different products, and different attributes of those products for an e-commerce store.
First, clone the repo at [email protected]:ryansheehy0/E_Commerse_API.git
.
Second, run npm install
in the Develop folder in order to install the npm packages.
Third, run mysql -u root -p
and type in your password. Note: you need a MySQL server installed.
Forth, run source ./db/schema.sql;
in your MySQL server.
Fifth, run npm run seed
in you terminal.
And finally, run node server.js
to start the server.
You can go to multiple different API links to get, create, update, and delete data.
- GET or POST http://localhost:3001/api/ tags, products, or categories
- GET, PUT, or DELETE http://localhost:3001/api/ tags, products, or categories /:id
API Examples:
POST http://localhost:3001/api/tags/
- Body
{
"tag_name": "green"
}
POST http://localhost:3001/api/products/
- Body
{
"product_name": "Basketball",
"price": 200.00,
"stock": 3,
"tagIds": [1, 2, 3, 4]
}
POST http://localhost:3001/api/categories/
- Body
{
"category_name": "Underwear"
}
Just install the project and follow the steps for using the app.
On the github page just click on the issues tab and then click the New issue button. Please try to leave a description of your problem and what steps you took that lead to the problem.
If you have any questions or issues feel free to reach out to me at
Github: ryansheehy0
or
Email: [email protected]
Just clone the repo, make your changes, push to a new branch, and make a pull request on github.