Tuesday, February 24, 2015

[NodeJS] My Simple Static Webserver


When developing pure HTML5 mockups I usually don't want to install a webserver or host my static pages on a remote webserver...
More over I sometimes like to create my own tools even if they are already on the net or they are super duper simple.

That's why I created a simple NodeJS static webserver.

You can find that simple app in this Github repo.

To use it just type:

$ git clone https://github.com/enreeco/simple-static-web-server

$ node server

This will create a local webserver @ http://localhost:3000/index.html: all the files must be kept on the root folder.

If you want to specify another port simply type:

$ node server 1234

And the magic will be @ http://localhost:1234/index.html.

Before leaving remember my motto:

No comments:

Post a Comment