Skip to content

Basic webserver using Express library

License

Notifications You must be signed in to change notification settings

NebelDev/Nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Basic webserver using Express library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published