Press "Enter" to skip to content

Setting up your development environment for Node.js, Express.js & MySQL

In this article, we will guide you through the crucial initial steps of setting up your development environment specifically tailored for Node.js, Express.js, and MySQL. By the end of this tutorial, you’ll have a well-configured environment, providing you with the necessary tools and resources to kickstart your MERN stack learning experience. Let’s pave the way for a seamless and efficient development process as you delve into the dynamic world of web development.

If you are following the MERN stack which includes MongoDB, you can skip the MySQL part.

Setting up MySQL

  1. Install the latest version of MySQL from their official website – https://dev.mysql.com/downloads/installer/
    Make sure that you install the non-web version.
  2. In the setup select custom and proceed to install the MySQL Server, MySQL Shell, and MySQL workbench.
    Once installed setup the root password and do not change any other settings.
  3. Now once the installation is complete go to the folder where \bin is located where MySQL Server is installed. In my case the path looked like this – C:\Program Files\MySQL\MySQL Server 8.0\bin
    But this may change based on where you have installed it.
  4. Add a new path in your Environment Variables and paste the path there.

The setup for MySQL is now complete ad we can verify this by entering MySQL –version in the command prompt. If installed correctly you should be able to see the installed version of MySQL.

Setting up Node.js

  1. Install the latest stable version of node from their official website – https://nodejs.org/en/download/current
  2. While installing make sure to check the ‘Automatically install the necessary tools.’ checkbox.

The setup for node is now complete ad we can verify this by entering node –version in the command prompt. If installed correctly you should be able to see the installed version of node.

Installing Express.js

Installing express is probably the easiest out of the lot. Open cmd and enter npm install express.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *