Simple Server DIY

Imgur

The Express framework was a project of TJ Holowatchuk. A web application of Node.js, Express has a powerful set of features to make an easy server.

STEP 1

If you have not installed Node.js, you will need to download it by visiting their website, nodejs.org. The installation of Node.js includes a package manager known as npm.

STEP 2

For our simple server, you will need a server.js and index.html files. I would recommend putting these files into a folder.

STEP 3 From the photos below, add the content to the server.js and index.html files.

server.js

Imgur

index.html

Imgur

STEP 4

Using your command line, get into the directory with the server.js and index.html files are located.

Imgur

STEP 5

Inside your command line, type in the following:

Imgur

Imgur

STEP 6

Type the below into your browser, and you should see “hello world” page.

Imgur

Imgur

Written on January 16, 2016