mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Merge pull request #151 from miclill/master
OpenShift IP-Fix for example/http.js
This commit is contained in:
commit
1c91d7428f
@ -1,4 +1,5 @@
|
||||
var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 80;
|
||||
var ip = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1';
|
||||
|
||||
var Gun = require('gun');
|
||||
var gun = Gun({
|
||||
@ -20,6 +21,7 @@ var server = require('http').createServer(function(req, res){
|
||||
}).pipe(res); // stream
|
||||
});
|
||||
gun.wsp(server);
|
||||
server.listen(port);
|
||||
server.listen(port, ip);
|
||||
|
||||
console.log('Server started on port ' + port + ' with /gun');
|
||||
|
||||
console.log('Server started on port ' + port + ' with /gun');
|
Loading…
x
Reference in New Issue
Block a user