Skip to content

macagua/nodejs-helloworld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nodejs-helloworld

A Node.js 'Hello World' program example.

Installation

You need install the pre-requirements for run this Hello World example.

Update repositories of available packages to install, with the following command:

$ sudo apt update

Install necessary minimum dependencies, with the following command:

$ sudo apt install curl software-properties-common gcc g++ make
$ curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
$ sudo apt install -y nodejs

Run application

You can run Hello World Demo, with the following command:

$ nodejs ./http_server.js

Then, you can open the URL http://127.0.0.1:3000/ in your web browser and you can see the hello world example like this:

A Node.js 'Hello World' program example

A Node.js 'Hello World' program example

Reference