lightning_strike

Journeyman middleware for serving static content

lightning_strike

Journeyman middleware for serving static content

Example:

var Journeyman      = require('journeyman');
var LightningStrike = require('lightning_strike');
var path            = require('path');
 
var server = new Journeyman(80);
var lightning = new LightningStrike(path.join(__dirname, 'test_dir'));
 
server.use(lightning.middleware());
 
server.listen();

Serves contents of 'test_dir' directory under the virtual directory 'static'.

  <script type='text/javascript' src='/static/test.js'></script>