Member-only story
Let’s build a banking app backend with Node.js, Nest.js, Sequalize, and PostgreSQL — Node.js Course: Lesson 3[PART 2]
This article was originally published at https://www.blog.duomly.com/node-js-course-with-building-a-fintech-banking-app-lesson-3-user-registration-response
In the previous week, I’ve published the second lesson of the Node.js Course, where we created registration and saved new users in our database.
If you would like to be updated, feel free to go back to the lesson one and follow up or get the first lesson code from our Github.
Today I’m going to refactor the code we’ve created for user registration to create a response which our API will send as a result.
We are going to create objects where we will select the data we would like to send as the response in case of successful registration and in case of the error.
And of course, as always, we’ve got a video version for you!
Before, we will start open the code from the previous lesson to be able to write it with…