The online marketplace uses Node.js(express) as backend, PostgreSQL as databse, Knex.js as connecter and query builder
Create a file called .env under config/ folder, the format is
DATABASE_HOST=
DATABASE_PORT=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_NAME=
Do
knex migrate:latest
to populate databases, then
knex seed:run
to run seed
After clone, do
npm install
To start the application
npm start
- Get All Proudct :
GET /product/getall?onlyavailable=
- Get One Proudct :
GET /product/getone/:title
- Add Item :
POST /cart/addItem
- Get Cart :
GET /cart/getcart
- Complete Cart :
POST /cart/complete