This code repository is for the Human Resource Management Project for Gratia Technology.
- Clone the repository.
- Install node_modules by using npm install command in the project directory where index.js is present.
- run the project using npm start command.
- visit url localhost:3000 to access the project via browser.
-
- controller : contains files which are responosible for performing logical or database operations. Routers uses controllers to handale all the logical operations.
- router : contains files which are responosible for performing routing, routes imports controllers.
- model : contains database models, controller imports model to perform CRUD operation.
-
- login - api/rol/login/ : method: post and required params are email and password and response will be employee info object.
- register - api/rol/register/ : method: post and required params are email, password, name, dob, phone, desgination and department and response will be employee info object.
Demo response
{
"message": "success",
"error": false,
"data": {
"emp_id": "GT/0007/22",
"email": "[email protected]",
"password": "d705377cdcd1c92de9e32ab79514b5805879e6dd2a2fb3ba63687ca329e76750",
"name": "Tutul Deb Roy",
"phone": "9854851059",
"dob": "29-09-1998",
"designation": "Project Assistant",
"department": "IT",
"_id": "622ef8abe6afc5aab6e3a832",
"__v": 0
}
}