Employee Management Backend This is a RESTful API built with Node.js, Express.js, and MongoDB
123
This is a RESTful API built with Node.js, Express.js, and MongoDB for managing employee data. It serves as the backend companion to the Employee App frontend.
{
"_id":{"$oid":"675997c56eead6e20ec3d35f"},
"email":"[email protected]",
"password":"Lawrance@110",
"company":"110 traders",
"data":[
{
"firstname":"Bruce",
"lastname":"venkatraman",
"dep":"dermatologist",
"_id":{"$oid":"6767c1131ad6dbfe7720be78"}
},
{
"firstname":"Foxx",
"lastname":"Rayappan",
"dep":"dentist",
"_id":{"$oid":"6767d6d7a333ecf4b9dfa051"}
},
{
"firstname":"Alfred",
"lastname":"Ayyasamy",
"dep":"dentist",
"_id":{"$oid":"6767d6e5a333ecf4b9dfa057"}
}
],
"createdAt":{"$date":{"$numberLong":"1733924808603"}},
"updatedAt":{"$date":{"$numberLong":"1734858481046"}},
"__v":{"$numberInt":"0"}}
signin
-POST /signin
-request body :
{ "email": "[email protected]", "password": "John@123","company":"john & Doe co"}
login
-POST /login
(you get all data from back-end replacement of GET request)
-request body :
{ "email": "[email protected]", "password": "John@123" }
3.Add-Employee
-POST /addEmployee/:id
(id = _id on user collection db)
-request body :
{
"firstname":"pepper",
"lastname":"pots",
"dep":"personal assistance"
}
4.update-Employee
-PUT /updateEmployee/:id/:employeeid
( id : _id on user collection db , employeeId : _id of employee from data array on corresponding document in user collection )
request body :
{
"firstname": "pepper",
"lastname": "pots",
"dep": "asistance"
}
5.Delete-Employee
-DELETE /deleteEmployee/:id/:employeeid
( id : _id on user collection db , employeeId : _id of employee from data array on corresponding document in user collection )
request body : none
Content type
Image
Digest
sha256:4b0d77135…
Size
401 MB
Last updated
almost 2 years ago
docker pull devpsriram/employee-app:v3