enable "Deploy to Heroku" Button
This commit is contained in:
parent
5c9d1a0416
commit
bd101ab44f
@ -6,9 +6,11 @@ PeerServer helps broker connections between PeerJS clients. Data is not proxied
|
|||||||
|
|
||||||
##[http://peerjs.com](http://peerjs.com)
|
##[http://peerjs.com](http://peerjs.com)
|
||||||
|
|
||||||
|
|
||||||
**If you prefer to use a cloud hosted PeerServer instead of running your own, [sign up for a free API key here](http://peerjs.com/peerserver)**
|
**If you prefer to use a cloud hosted PeerServer instead of running your own, [sign up for a free API key here](http://peerjs.com/peerserver)**
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
[](https://heroku.com/deploy)
|
||||||
|
|
||||||
### Run PeerServer
|
### Run PeerServer
|
||||||
|
|
||||||
|
5
app.json
Normal file
5
app.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name": "PeerJS Server",
|
||||||
|
"description": "A server side element to broker connections between PeerJS clients.",
|
||||||
|
"website": "http://peerjs.com/"
|
||||||
|
}
|
@ -212,6 +212,10 @@ PeerServer.prototype._initializeHTTP = function() {
|
|||||||
|
|
||||||
this._app.on('MethodNotAllowed', unknownMethodHandler);
|
this._app.on('MethodNotAllowed', unknownMethodHandler);
|
||||||
|
|
||||||
|
this._app.get('/', function(req, res, next) {
|
||||||
|
res.send(require('../app.json'));
|
||||||
|
});
|
||||||
|
|
||||||
// Retrieve guaranteed random ID.
|
// Retrieve guaranteed random ID.
|
||||||
this._app.get(this._options.path + ':key/id', function(req, res, next) {
|
this._app.get(this._options.path + ':key/id', function(req, res, next) {
|
||||||
res.contentType = 'text/html';
|
res.contentType = 'text/html';
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
"node": ">=0.8"
|
"node": ">=0.8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha test"
|
"test": "mocha test",
|
||||||
|
"start": "bin/peerjs --port ${PORT:=9000}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user