This project is an e-commerce application REST API built using Express, Node.js, and Postgres. It allows users to perform various CRUD operations such as registering an account, browsing products for sale, etc.
- Build a functioning e-commerce REST API
- Allow users to register and log in via the API
- Allow CRUD operations on products
- Allow CRUD operations on user accounts
- Allow CRUD operations on user carts
- Allow a user to place an order
- Allow CRUD operations on orders
- Use Git version control
- Use command line
- Develop locally on your computer
- Document the API using Swagger
- JavaScript
- Git and GitHub
- Command line
- Express
- PostgreSQL
-
Clone the repository to your local machine.
-
Install the dependencies:
npm install -
Create a
.envfile and add the following environment variables:PORT=3000DATABASE_URL=postgres://localhost:5432/ecommerce -
Start the API:
npm start
The API will be running on port 3000. You can test it using a REST client such as Postman.
The API is documented using Swagger. You can find the documentation in this repository as openapi.json.
Contributions are welcome! Please open a pull request if you have any improvements to make.