First, I want to explain what my problem was and how I solved it. One day, one of my colleagues sent me a 1GB CSV ( something about 60M line) file and said there are many customer’s phone numbers some of them are duplicated and we don’t need them. Please insert them into the database and give me the table name.
At first, I thought it’s easy and I started to read the file line by line. …
Thanks to Part-1 we could decide about which database is better to use, after that we had talked about running the Postgres by docker in our Operator system.
As I mentioned in my Instagram post ORM is a tool that you can easily connect to your database and fetch the data as you want. Getting easier data is not just the point of using ORM, Also, increase security (SQL Injections), clean code, avoid hard code, and many other valuable things. Because of these reasons, we will continue using the database by ORM.
Why shouldn’t we? Throughout most projects, we make use of databases. Essentially, for saving any data, we use a database. For example, for signing up a user, we have to store the data (the user’s credentials) somewhere.
Actually, whether it’s for storing data, processing data, artificial intelligence, IoT, anywhere can you think of, developers are using databases.
You have many choices for selecting a database. It depends on what you want to store and what your data structure looks like. We have two types of databases, SQL and NoSQL (not only SQL). …
I saw a lot of articles about logging and best practices methods for logging. But each of them explained separately some part of logging. Here I want to explain how to start logging in Express and how to see results in the monitoring tools. And I will go directly into writing the code.
🎥 I strongly recommend you watch this video before you start reading this article:
Console is one of the built-in functions in Node.js. as I said it’s the most basic tool for showing logs in your environment’s console.
I started NodeJs developing 4 years ago. At first, I was working on some urgent projects and I was forced to finish them As soon as possible, and I didn’t have enough time to create any good structure for my Projects.
After a while, I stuck in my Spaghetti Code and I learned if I have 10 minutes to cut all trees, Sharpen my ax for 9 minutes, and 1 minute to cut all trees. And now I want to share my experience of avoiding Spaghetti code and share my code structure.
Life is doing your love. Ready to growing. Sharing my Idea and ready to listen to everyone.