In the last article, I described how to configure the NestJS application to work with Mysql using TypeORM. The approach mentioned in the article is good enough to build a quick prototype or during learning of the NestJS framework. But there are some significant cons with this approach. Let’s do some coding before I explain the cons of the mentioned approach.
In the previous article, we made sure that our code accepts the database configurations from the
.env file and successfully connecting to the database and nothing else. Let’s change that.
We will start with defining the
Recently I started working on the NestJS to get comfortable with the server-side node js framework and learn Typescript. I have decided to write down the learning as I implement them. I am in no way an expert in either NextJS or Typescript. So, please bear with me if I make any mistakes.
Today I will try to explain different approaches to take while configuring the MySQL database with NestJS using typeorm. To get a head start on the configuration section, you can go through their official database documentation.
A lot of you might find this very odd but, the year 2020 was good for me. When many people worldwide found it difficult to make ends meet, I continued with my job and got a comparably good appraisal. While people were evicted from their homes as they can’t afford to pay their house rent, I was safe at my parents' house. While my colleague lost loved ones to the COVID, my family and I were safe. So, 2020 was a good year for me.
Yes, I did not get to travel to any new destination.
Yes, I was not…
I have always struggled with “Tell me something about yourself?” question. It doesn’t matter how many times I practice it in front of a mirror or with friends. I always failed to answer it, and somehow end up making things a little bit awkward for all parties involved. I am glad that those days are long gone, and nobody asks me this question anymore.