Last active
June 27, 2016 06:35
-
-
Save safaorhan/992d7e019fc107e60a93319b26505f03 to your computer and use it in GitHub Desktop.
This file contains 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
// 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