It is a backend server BMI Calculator web application which is deployed on Render.com
Server: Node, Express, Mongoose, JWT, argone2
Database: MongoDB
https://terisoft.onrender.com/
POST /user/register
body | Type | Description |
---|---|---|
name |
string |
Required. |
email |
string |
Required. |
password |
string |
Required. |
Responses
status:200 (successful)
res={
status:true,
messege:"user created successfully"
}
status:400 (unsuccessful)
res={
status:false,
messege:"user already registered"
}
res={
status:false,
messege:"something went wrong"
}
POST /user/login
body | Type | Description |
---|---|---|
email |
string |
Required. |
password |
string |
Required. |
Responses
status:200 (successful)
res={
status:true,
toekn:"andkfsafkp[@kfkfk255FFF",
name:""XYZ
}
status:400 (unsuccessful)
res={
status:false,
messege:"Wrong Password"
}
res={
status:false,
messege:"User not found"
}
POST /user/logout
body | Type | Description |
---|---|---|
token |
string |
Required. |
Responses
status:200 (successful)
res={
status:true,
messege: "User logout successfully"
}
status:400 (unsuccessful)
res={
status:false,
messege: "something went wrong"
}
POST /bmi/calculateBMI
body | Type | Description |
---|---|---|
weight |
string |
Required. |
height |
string |
Required. |
headers | Type | Description |
---|---|---|
token |
string |
Required. |
Responses
status:200 (successful)
res={
status:true,
result:20.12
}
status:400 (unsuccessful)
res={
status:false,
messege: "Something went wrong"
}
status:403 (unsuccessful)
res={
status:false,
messagee: "Unauthorised"
}
status:401 (unsuccessful)
res="Operation not allowed."
GET /bmi/getCalculationHistory
headers | Type | Description |
---|---|---|
token |
string |
Required. |
Responses
status:200 (successful)
res={
status:true,
result: [... resposes]
}
status:400 (unsuccessful)
res={
status:false,
messege: "Something went wrong"
}
status:403 (unsuccessful)
res={
status:false,
messagee: "Unauthorised"
}
status:401 (unsuccessful)
res="Operation not allowed."
GET /profile/getProfile
headers | Type | Description |
---|---|---|
token |
string |
Required. |
Responses
status:200 (successful)
res={
status:true,
result: {...users data}
}
status:400 (unsuccessful)
res={
status:false,
messege: "bad request"
}
status:403 (unsuccessful)
res={
status:false,
messagee: "Unauthorised"
}
status:401 (unsuccessful)
res="Operation not allowed."
Clone the project
git clone https://github.com/PrasadK05/Tericsoft_backend.git
Install dependencies
npm install
Start the server for developement
npm run dev
Start the server for production
npm run start
Checkout front end repo and live website