© 2023 Hashnode
#sequelize
Writing database queries without the model like below SELECT * FROM your_table_name WHERE column_name = 'some_value'; has many issues like adding proper data type validation etc. to get data from the…
Libraries Express dotenv To manage environment variables inside.env file. env variable is a variable outside the program built inside the OS through some functionality. http-status-codes Detai…
STEP 0: Creating an empty Nodejs repository Go to your desired directory and run the below command to setup an empty directory with package.json npm init -y STEP 1: Creating a server To create an exp…
I've been working with Sequelize on the PairUp project for a little bit now. I've talked about transactions, migrations, and data integrity. However, I didn't quite put together why Sequelize specifically has a unique approach and implemen…
In this blog, we will build a RESTful Book Directory API using Node.js, Express, and Sequelize with Swagger API documentation. I am also sharing the project's Source code for your reference: https://github.com/DhananjayThomble/Book-Director…
Heads up! I've decided to self-host my blog. I'm leaving this post live as to not "break the internet" but feel free check out the post on my new blog here! At Quil, we write substantially more integration tests for our API than any other …
Techletter #18 | April 09, 2023 Connecting to the database is one of the important tasks before building any backend application. As my stack is JavaScript I will be using nodejs to build a backend application along with the PostgreSQL. As …
Let's say we are working on a web application that stores students information such as their name, email, and password. As the application grows and evolves, we may need to change the way this informa…
Sequelize is a promise-based Node.js Object-Relational Mapping (ORM) tool. An ORM is a library that simplifies SQL database management by making query execution and database setup as simple as possibl…
Single Table Inheritance Single Table Inheritance (STI) is a design pattern in database modeling where a single table is used to store multiple types of entities that share a common set of attributes,…