Skip to content

Instantly share code, notes, and snippets.

@marshallswain
Last active December 16, 2015 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshallswain/5420911 to your computer and use it in GitHub Desktop.
Save marshallswain/5420911 to your computer and use it in GitHub Desktop.
Server.js file for LocomotiveJS.
var locomotive = require('locomotive'),
env = process.env.NODE_ENV || 'development',
port = process.argv[2] || process.env.PORT || 3000,
address = '0.0.0.0';
console.log(process.argv);
locomotive.boot(__dirname, env, function(err, server) {
if (err) { throw err; }
server.listen(port, address, function() {
var addr = this.address();
console.log('listening on %s:%d', addr.address, addr.port);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment