Node/Express REST API to provide typical functionality found in an ecommerce website. Users can create accounts, view products, add products to a cart, and place/view orders.
To run locally, npm install
, then npm run start
This project requires a PostgreSQL database to be running locally. Reference ecommerce.pdf located in the /db/design
folder of this repo to view the structure of the tables. You can use pgAdmin to interact with the database manually.
Once the app is running locally, you can access the API at http://localhost:3000
Swagger documentation available at /swagger/openapi.yanl
I used the Codecadmey Off-Platform Project: Boss Machine as a starting point for all my route tests.
You can use various HTTP clients such as Postman or Insomnia to make requests to the API endpoints.
Note: Some endpoints are protected and require authentication. In order to properly access these endpoints, you will need to have a session cookie present when making your request. This is accessed by hitting the /auth/login
endpoint first. HTTP clients will automatically store cookies and send them with subsequent requests.