The backend API is built using Node.js. It contains endpoints that enables the user to query the PostgreSQL and Redis databases.
-
Install application dependencies:
npm install
-
Run PostgreSQL on Docker:
docker run --rm -p 5432:5432 --name kuma-postgres -e POSTGRES_USER=kumademo -e POSTGRES_PASSWORD=kumademo -e POSTGRES_DB=kumademo kvn0218/postgres:latest
-
Run Redis on Docker:
docker run -d -p 6379:6379 --name redis1 redis
-
Start the Node application:
npm start
-
Add mock data by making a
POST
request to the/upload
endpointcurl -X POST http://localhost:3001/upload
- Upload mock data :
POST /upload/
- Get all marketplace items :
GET /items/
- Get marketplace item with item id :
GET /items/:id/
- Get marketplace item with item id :
GET /items/:id/reviews/