A brief description to get all response as a json object
npm i express jsonwebtoken bcryptjs multer pg
const Pool = require("pg").Pool;
const pool = new Pool({
user: "postgres",
password: "123456",
database: "postgres",
host: "localhost",
port: 3600, //default 5432
});
POST : /register
-
For register an user need to pass this parameters
name,email,password,gender,age
-
Or pass it like a json object with postman Body
{ "name":"example", "email":"example@example.com", "password":"example", "gender":"male", "age":25, }
POST : /login
-
For register an user need to pass this parameters
email,password
-
Or pass it like a json object with postman Body
{ "email":"example@example.com", "password":"example" }
POST : /productCategory
-
For register an user need to pass this parameters
categoryname, categorydescription
-
Or pass it like a json object with postman Body
{ "categoryname":"mobile", "categorydescription":"All Brands available" }
GET : /productCategory
POST : /product
-
For register an user need to pass this parameters
category_Id, name, description, price
-
Also upload a image file for productImage
-
Or pass it like a form-data with postman Body
GET : /product
POST : /product/:id
-
For register an user need to pass product id as a params
/product/productId
-
Also need to pass a verified token by params or as a json object postman Body
{ "token":"token" }
GET : /orderedlist
-
Need to pass a verified token by params or as a json object postman Body
{ "token":"token" }