Profile Service Intro

Recently I worked on a backend which is known as a profile service. It is NodeJs backend based upon express js. This service gives us 3 endpoints that are health, profile and verification. I have used yarn package manager to make it. Yarn helps in keeping my packages global so that I can use it afterwards.

nodejs-light.png

I deployed this service on Heroku. Health endpoint tells you whether the service is running or not. Profile endpoint gives you data about the person whom this service belongs to, to verify and keep updating the details. Verification endpoint is used to confirm the secret chain code provided to a particular user and hence verify a user. This service is a part of a bigger service in RDS.

heroku.png

I have implemented testing using mocha and chai in js. This helps me to check either my service is working or not without making calls to deployment. Also it helps me assess all the edge cases I could think of and make my service more reliable. I also added Joi validation so that if body of any request is not correct then it will not call the route make our calls more stable.

mocha-chai.webp