Skip to content

Instantly share code, notes, and snippets.

@safaorhan
Last active June 27, 2016 06:35
Show Gist options
  • Save safaorhan/992d7e019fc107e60a93319b26505f03 to your computer and use it in GitHub Desktop.
Save safaorhan/992d7e019fc107e60a93319b26505f03 to your computer and use it in GitHub Desktop.
// production.js
var deployd = require('deployd');
var server = deployd({
port: process.env.PORT || 5000,
env: 'development',
db: {
host: 'localhost', // Our mongo instance runs in our server itself. Remember? (127.0.0.1)
port: 27017, // Update this line,
name: 'deployd', // this line,
credentials: {
username: 'deployd', // this line,
password: 'your_password' // and this line.
}
}
});
server.listen();
server.on('listening', function() {
console.log("Server is listening");
});
server.on('error', function(err) {
console.error(err);
process.nextTick(function() { // Give the server a chance to return an error
process.exit();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment