Created
August 6, 2012 16:28
-
-
Save alexjamesbrown/3276217 to your computer and use it in GitHub Desktop.
Example server.js for LocomotiveJS app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var locomotive = require('locomotive'), | |
env = process.env.NODE_ENV || 'development', | |
port = process.env.PORT || 3000, | |
address = '0.0.0.0'; | |
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
this doesn't work in last locomotiveJS version (V0.4.0)