https://github.com/insh007/AegisCovenant---Frontend
https://github.com/insh007/AegisCovenant-Backend
https://ages-covenant-api.onrender.com
https://ages-covenants-app.onrender.com
{
name: {string, mandatory},
email: {string, mandatory, unique},
password: {string, mandatory} // encrypted password
}
Create a user document from request body. Save password in encrypted format (use bcrypt). Response format On success - Return HTTP status 201. Also return the user document like below:
{
"status": true,
"data": {
"name": "John",
"email": "johndoe@mailinator.com",
"password": "$2b$10$DpOSGb0B7cT0f6L95RnpWO2P/AtEoE6OF9diIiAEP7QrTMaV29Kmm",
"_id": "6162876abdcb70afeeaf9cf5",
"__v": 0
}
}
On error - Return a suitable error message with a valid HTTP status code. The response should be a JSON object like below :
Error Response structure
{
status: false,
msg: ""
}
Allow an user to login with their email and password. On a successful login attempt return a JWT token containing the userId.
Response format On success - Return HTTP status 200 and JWT token in response body. The response should be a JSON object like below:
{
"status": true,
"token": {
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MTYyODc2YWJkY2I3MGFmZWVhZjljZjUiLCJpYXQiOjE2MzM4NDczNzYsImV4cCI6MTYzMzg4MzM3Nn0.PgcBPLLg4J01Hyin-zR6BCk7JHBY-RpuWMG_oIK7aV8"
}
}
On error - Return a suitable error message with a valid HTTP status code. The response should be a JSON object like below :
Error Response structure
{
status: false,
msg: ""
}
Response format On success -
{
"indigo": "₹2126",
"airAsia": "₹3357",
"vistara": "₹1199"
}
On error - Return a suitable error message with a valid HTTP status code. The response should be a JSON object like below :
Error Response structure
{
status: false,
msg: ""
}
- Clone the repository to your local machine.
- Run npm install to install the dependencies.
- Run npm start to start the app.
- MongoDB: a NoSQL database used for storing and retrieving data
- Express.js: a web application framework for Node.js
- React: a JavaScript library for building user interfaces
- Node.js: a JavaScript runtime environment for running server-side code
- HTML & CSS: for building web pages