Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Listing port defined in env variable #18

Merged
merged 3 commits into from

2 participants

Daniel Kutik David Peter
Daniel Kutik

Server listen port can now be defined in environment variables (useful for Heroku, CloudBees, cloud9), fallback to 8080

Smaller code improvements

David Peter sarenji merged commit 4d3492f into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 3, 2013
  1. Daniel Kutik

    declared

    danielkutik authored
  2. Daniel Kutik

    Removed unused variable

    danielkutik authored
  3. Daniel Kutik

    Server listen port can now be defined in environment variables (usefu…

    danielkutik authored
    …l for Heroku, CloudBees, cloud9), fallback to 8080
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +1 −2  site/script.js
  2. +2 −1  site/server.js
3  site/script.js
View
@@ -1,5 +1,4 @@
var videos = [];
-var rooms = [1, 2, 3, 4, 5];
var PeerConnection = window.PeerConnection || window.webkitPeerConnection00 || window.webkitRTCPeerConnection;
function getNumPerRow() {
@@ -155,7 +154,7 @@ function initChat() {
}
}, false);
rtc.on(chat.event, function() {
- data = chat.recv.apply(this, arguments);
+ var data = chat.recv.apply(this, arguments);
console.log(data.color);
addToChat(data.messages, data.color.toString(16));
});
3  site/server.js
View
@@ -2,7 +2,8 @@ var app = require('express')();
var server = require('http').createServer(app);
var webRTC = require('webrtc.io').listen(server);
-server.listen(8000);
+var port = process.env.PORT || 8080;
+server.listen(port);
Something went wrong with that request. Please try again.