Libraries used :
"bcryptjs": "for encrypying and decrypting the password used while logging in",
"dotenv": "for environment variables",
"express": "allows to set middlewares",
"express-validator": "for server side data validation"
"jsonwebtoken": "for access and refresh tokens",
"mongoose": "for schema validation",
"multer": "for uploading multipart/form-data, here, for uploading image",
"password-validator": "to validate the password based on requirements"
API endpoints:
//to login
"localhost:8080/psy/login"
//to register a new patient
"localhost:8080/psy/patientRegistration"
//to get hospital details
"localhost:8080/psy/fetchdetails"
//to generate access token
"localhost:8080/psy/generateaccesstoken"
Postman Collection: https://www.postman.com/supply-technologist-26151885/workspace/hospital/collection/18016435-700a87e6-6670-450d-a7c1-48e0956c0aa8?action=share&creator=18016435