How to build a custom server with nodejs in 3 min

Sandeep Chahal
Thursday, November 26 2020
#nodejs
0

Hello people!

Hope you like my previous HOW TO tutorials. So in today's post, we will be making a custom server with Nodejs in 3 minutes.

What you need:

  • Knowledge of javascript and Nodejs

  • Npm installed

So without any further due, let us get to the main point.

If you have installed the npm package, then Go to the terminal!




//switch to the directory where you want to store your files



cd documents







//make a new folder to store the meta data of the server.



mkdir server







//switch to this "server" file and then start with npm



cd server







//create a package.json file with npm



npm init







//use this command to create a file named app.js



touch app.js

NOTE: we will code only in the app.js folder.

photo

Comments

Saturday, May 22 2021

Nice tut.

Monday, April 12 2021

Really informative