An ecommerce web app. Built with typescript, node deployed on AWS. Tested with POSTMAN.
- See all products
- Search products
- Add to cart
-
Clone the repository:
git clone cd
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and add your configuration settings.PORT=3000 DB_FILE=gaf_database.sqlite
-
Create and Seed the database:
node database/db.js node database/seed.js
To start the server, use the following command:
npm start
The server will run on the port specified in the .env
file. If no port is specified, it will default to 3000
.
GET /products
- Retrieve a list of all available productsGET /products/random
- Retrieve details of a specific product with ID 123GET /products/
- Search (Request body:['iphone']
) Hardcoded at present.GET /product/123
- Retrieve details of a specific product with ID 123DELETE /product/123
- Deletes a specific product with ID 123