How to connect your MySQL database to your NodeJS application? It’s very simple. Don’t believe me? Here’s how you can do it.

First, create a folder in your Node application direction named config. Now, this can be of any name of your preference.

Inside this folder, create a file named database.js. This file will contain our database configuration and connection.

Now, there are 2 ways in which you can create a database connection in NodeJS. The simple connection and a pool connection. I prefer the latter because of a few reasons which I am going to explain later.

Creating a…


What is street photography?

For me, street photography is all about capturing simple moments and finding a story in it. Just take a walk with your camera or smartphone, feel the vibe of a particular moment and press the shutter.

In this story, I want to share my experience about street photography in Mumbai, India.

I came to Mumbai a year and a half back and I instantly fell in love with the city. The fast paced life here is what I always craved for. People are not concerned about who you are or what you do. You can be…


This is a detailed explanation of a basic NodeJS application configuration file.

One of the most confusing things we face while stepping into the world of API’s is how to configure our application. In this tutorial, we will be going through a basic application configuration which will help us to understand about the basics.

Usually we find some boiler plate or use express generator to help us ease the pain to create a configuration file from scratch. But it is necessary to understand what it does before diving into building API’s. So, we will create one from scratch.

First we…


Before starting with the basic setup for NodeJS, first we need to know what is it and why we are using it.

NodeJS is a javascript runtime environment.

As we know, javascript needs a browser to run. But with NodeJS, we can use it as a scripting language which can be run in a server. This makes it easy for someone with knowledge of javascript, especially frontend developers, to try their hands on backend development like making API’s which will enable them to become a full stack developer in a short amount of time.

NodeJS installation :

Ubuntu :

Windows…

Sayantan Mukherjee

Full stack developer

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