
Member-only story
How to Create a Simple Web Server using Node.js
Create a web server using Node.js — a simple tutorial for 2021.
This is a simple tutorial to teach you how to create your own web server using Node.js. We won’t be using any fancy frameworks for this, just good old JS. This can also be a refresher for those of you who haven’t done this without the use of a framework like Express.
For those who aren’t sure what exactly Node.js is, Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine. — as stated on their website
Before we get started we need to:
- Make sure we have Node downloaded locally on our computer, here is the link to the downloads page. There are few different versions, make sure to select the correct version for the Operating System (macOS, Linux, Windows .. ) that you are using.
- The installation process is fairly simple, and as this is a tutorial on creating a web server I don’t want to turn this is into a Node.js installation tutorial. But to check if we have successfully installed Node you can do the following on a command-line interface:
3. Have a text editor handy, I am using VS Code for this tutorial
Let’s get started!