Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 804 Bytes

File metadata and controls

18 lines (14 loc) · 804 Bytes

Node.js - The simplest way to create a web server

In this project I use Node.js and Express module to create a simplest web server.
The web server is listening on the port 3000 and will show you the "index.html" as hompage.
You can change the listening port editing the line "app.listen(process.env.PORT || 3000)" and set 80 instead of 3000.
The directory "html" is important to place static web pages that won't be process as script page.

Static HTML files

Inside the folder html you can place your static html/ javascript files. For an advanced webserver we should use templates.

Default homepage

var options = {
  index: "index.html"
};

Change the index var with your static homepage file.