What is the problem?

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.

What did I do at first?

At first, I thought it’s easy and I started to read the file line by line. …


Summerize of the previous post

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.

What is ORM

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.

We have many ORM tools for node js…


Why do we need a database?

Photo by Jan Antonin Kolar on Unsplash

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.

Finally, which kind of database?

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

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.

Console has many functions that you can access…


What is the Story

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.

First Step — Decide about frameworks.

Don’t forget to use a framework, Select it…

Faraz Faraji

Life is doing your love. Ready to growing. Sharing my Idea and ready to listen to everyone.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store