This is the backend to that provides the api for an e-commerce store.
you need to have node.js preinstalled.
npm install
npm start
The server is running on localhost port 7700, the REST API to the app is described below:
requests are to be made in JSON format to http:localhost:7700/api
.
All responses are of JSON format:
{
message: String,
data: Object
}
GET /ping/
Request OK- 200
{
"msg": "hello world"
}
POST /auth/register/
{
"email": "example@gmail.com",
"password": "Password@123"
}
Request OK- 200
{
"msg": "user is successfully saved"
}
POST /auth/login/
{
"email": "example@gmail.com",
"password": "Password@123"
}
Request OK- 200
{
"msg": "You have logged in successfully",
"data": {
"email": "example@gmail.com"
}
}
DELETE /auth/logout/
Request OK- 200
{
"msg": "Logout Success"
}