How-to QuickStart with Node.js Html WebServer on Ubuntu 15.04 Vivid 32-64bit GNU/Linux

May 11th, 2015 by thelinuxevangelist

Node.js WebServer QuickStart for Ubuntu Linux

The Linux Tutorial Shows You Step-by-Step How-to Getting-Started with Node.js Html Static WebServer on Ubuntu 15.04 Vivid Vervet i386/amd64 Linux+GNU Desktop/Server.

Node.js is an Amazing New Javascript Stuff that is at the Same Time either a Web Server and a Web Development Framework.

Node.js is Well Known for his Performances and Scaling Attitudes derived from a Single Thread Non-Blocking Architecture “First come, first served”.

Node.js QuickStart on Ubuntu 15.04 Vivid - Featured
  1. Open a Shell Session
    Ctr+Alt+t on Desktop
    (Press “Enter” to Execute Commands)

    Linux Ubuntu Node.js WebServer QuickStart - Featured
  2. How-to Install Latest Node.js on Ubuntu Linux:

    Node.js Installation for Ubuntu
  3. Installing Needed Node.js Modules

    sudo npm install content serve-static
  4. Making Node.js WebServer Directories

    mkdir -p ~/Documents/node.js/webserver/static
  5. Making Node.js WebServer Script

    cd ~/Documents/node.js/webserver
    nano webserver.js

    Append something like:

    var connect = require('connect');
    var serveStatic = require('serve-static');
    var app = connect();

    Ctrl+x to Save & Exit from nano Editor ;)

  6. Running the Local WebServer

    node webserver.js
  7. Creating a Hello World Node.js Html

    nano ./static/hello.html

    Insert some Html content like:

    <!DOCTYPE html>
    <title>Hello-World from Node.js</title>
    Hello World from a Node.js WebServer!
  8. Open Html Page on Browser
    Point to:


    You should be Happily Greeted with an: “Hello World from a Node.js WebServer!”

Share on Tumblr

Tags: , , , , , , , , , , , , , , , , , , , , , , , ,

Comments are disabled