- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.js
More file actions
Latest commit
31 lines (25 loc) · 630 Bytes
/
Copy pathserver.js
File metadata and controls
31 lines (25 loc) · 630 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
vardeployd=require('deployd');
varserver=deployd({
port: process.env.PORT||5000,
env: "production",
db: {
host: 'ds019038.mlab.com',
port: 19038,
name: 'build_react_native',
credentials: {
username: process.env.MONGODB_USERNAME,
password: process.env.MONGODB_PASSWORD
}
}
});
server.sockets.manager.settings.transports=['xhr-polling'];
server.listen();
server.on('listening',function(){
console.log('Server is listening on port: '+process.env.PORT);
});
server.on('error',function(err){
console.error(err);
process.nextTick(function(){
process.exit();
})
})