Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Command line static file server with fast live reloading, jade compiling, less compiling, directory listing.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
public
views
.gitignore
README.md
app.js
package.json

README.md

basic express webserver

To setup:

$ npm install

To start:

$ node app.js

Specify port:

$ node app.js -p 8000

File watching & auto reloading

To start with file watching:

$ node app.js -w

to have your webpage auto reloading/refresh, include:

<script src="/socket.io/socket.io.js"> 
</script><script src="/reload.js"></script>

Jade and Express routing

In app.js uncomment the following lines:

app.get('/', function(req, res) {
    res.render('index', {
        title: 'Simple Server',
        watch: {
            enabled: watch,
            script: '<script src="/socket.io/socket.io.js"></script><script src="/reload.js"></script>'
        }
    });
});
Something went wrong with that request. Please try again.