Skip to main content

Command Palette

Search for a command to run...

Lets Install And Get Started With Node.JS

Updated
2 min read
Lets Install And Get Started With Node.JS
S

I'm Shubham (@shubhamsinghbundela), I'm a Software Engineer, a Full-stack developer, a tech enthusiast, and a technical writer here on @Hashnode. I have a strong zeal to share my acquired knowledge and I am also willing to learn from others.

Installation Process

  1. Search on Google: install node

  2. Click on Link https://nodejs.org/en/download/

  3. Choose either LTS or Current depending on you i.e. you want the latest features by choosing the Current one or old features that already worked and reviewed.

  4. After clicking on window Installer you see its started downloading

  5. Click on next

  6. Read and Accept term in the license Agreement and click next

  7. Click next

  8. Click next

  9. Choose checkBox and click next

  10. Installation started and after installation click finish

  1. After clicking on finish one terminal popup to install chocolatey please press any Key from Keyboard to continue

  1. After clicking any key from keyboard, PowerShell opened and waits for 5minute until options come TYPE ENTER to exit

  1. Type Enter and you are done

How to Check Whether node.JS is installed or not in your system?

Follows Steps

  1. Open VS code and then create index.html file and nodetesting.js file and then write this code below
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <h1>Hello, world!</h1>
  </body>
</html>const http = require('http')
const fs = require('fs')
http.createServer((req, res) => {
  fs.readFile('index.html', (err, data) => {
    res.writeHead(200, {'Content-Type': 'text/html'})
    res.write(data)
    res.end()
  })
}).listen(8000)
  1. Open Terminal of vs code and write on terminal node nodetesting.js and Hit Enter

  2. Open chrome browser using open with Live server extension and you can see a similar

  3. Finally, You are done with server-side programming. Congrats!

D

Hey thanks for the tutorial! I found one of the hardest things about getting started with Node.js is actually getting it installed and running. This would have SO helpful for me if I was getting started. Great job!

1

More from this blog

Shubham Tech. Blog's

55 posts

Problem Solver | Currently Working As a Full Stack Developer, Community Leader At @Dev_Matrix | Previously Contributor at @RealDevSquad, @TeamShiksha