Merge pull request #154 from amark/master

Master -> Develop
This commit is contained in:
Mark Nadal 2016-01-30 14:08:03 -08:00
commit cccba23a73
2 changed files with 6 additions and 3 deletions

View File

@ -46,7 +46,8 @@ Try the [interactive tutorial](http://gun.js.org/think.html) in the browser (**5
### Videos
- [Fault tolerance](https://www.youtube.com/watch?v=-i-11T5ZI9o&feature=youtu.be) (01:01)
- [Saving relational or document based data](https://www.youtube.com/watch?v=cOO6wz1rZVY&feature=youtu.be) (06:59)
- [GUN's YouTube channel](https://www.youtube.com/channel/UCQAtpf-zi9Pp4__2nToOM8g/playlists) also has videos
- [Everything you want to know about GUN](https://youtu.be/qJNDplwJ8aQ) (57:50) 2x speed recommended.
- [GUN's YouTube channel](https://www.youtube.com/channel/UCQAtpf-zi9Pp4__2nToOM8g/playlists) also has videos.
### <a name="gun-projects"></a>Projects
- GUN users are encouraged to add their projects to this [running projects list](https://github.com/amark/gun/wiki/projects).

View File

@ -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');