Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Convert server to a heroku app

  • Loading branch information...
commit 4c445fa8a41f2467d6ab778a5024927cdb42a83d 1 parent b8de931
@anantn authored
View
1  Procfile
@@ -0,0 +1 @@
+web: node app.js
View
6 README.md
@@ -7,4 +7,8 @@ name: social.manifest.<foo>
ln -s /web/server/socialapi /code/socialapi-demo
-value: {"location":"http://localhost/socialapi/manifest.json","name":"WebRTC Social Demo","iconURL":"http://localhost/socialapi/icon.png","workerURL":"http://localhost/socialapi/worker.js","sidebarURL":"http://localhost/socialapi/sidebar.htm","origin":"http://localhost","enabled":true,"last_modified":135101330568}
+value: {"location":"http://localhost/socialapi/static/manifest.json","name":"WebRTC Social Demo","iconURL":"http://localhost/socialapi/static/icon.png","workerURL":"http://localhost/socialapi/static/worker.js","sidebarURL":"http://localhost/socialapi/static/sidebar.htm","origin":"http://localhost","enabled":true,"last_modified":135101330568}
+
+To start the server:
+
+$ node app.js
View
16 app.js
@@ -0,0 +1,16 @@
+var express = require("express"),
+ https = require("https"),
+ app = express();
+
+app.use(express.bodyParser());
+app.use(express.cookieParser("thisistehsecret"));
+
+app.use(express.session());
+app.use(express.static(__dirname + "/static"));
+
+var port = process.env.PORT || 5000;
+var audience = process.env.AUDIENCE || "http://webrtc-social.herokuapp.com";
+
+app.listen(port, function() {
+ console.log("Port is " + port + " with audience " + audience);
+});
View
10 manifest.json
@@ -1,10 +0,0 @@
-{
- "services": {
- "social": {
- "name": "Demo Social Service",
- "iconURL": "/icon.png",
- "workerURL": "/worker.js",
- "sidebarURL": "/sidebar.htm",
- }
- }
-}
View
17 package.json
@@ -1,18 +1,13 @@
{
- "author": "Michael Hanson <mhanson@mozilla.com>",
- "name": "MozillaDemoSocialService",
- "description": "A really simple social network for demo purposes",
+ "name": "webrtc-social-demo",
+ "description": "A WebRTC Social API demo",
"version": "0.0.1",
- "main": "lib/server",
- "private": "true",
"engines": {
- "node": ">=0.4.7"
+ "node": "0.8.x",
+ "npm":"1.1.x"
},
"dependencies": {
- "websocket":"",
- "express":""
- },
- "scripts": {
- "test": "node test/run.js"
+ "express": "3.0.x",
+ "ejs": "0.8.x"
}
}
View
0  chatWindow.html → static/chatWindow.html
File renamed without changes
View
0  flyout.html → static/flyout.html
File renamed without changes
View
0  icon.png → static/icon.png
File renamed without changes
View
0  index.html → static/index.html
File renamed without changes
View
10 static/manifest.json
@@ -0,0 +1,10 @@
+{
+ "services": {
+ "social": {
+ "name": "WebRTC Social Demo",
+ "iconURL": "/static/icon.png",
+ "workerURL": "/static/worker.js",
+ "sidebarURL": "/static/sidebar.htm",
+ }
+ }
+}
View
0  message.png → static/message.png
File renamed without changes
View
0  server.js → static/server.js
File renamed without changes
View
0  sidebar.css → static/sidebar.css
File renamed without changes
View
0  sidebar.htm → static/sidebar.htm
File renamed without changes
View
0  sidebar.js → static/sidebar.js
File renamed without changes
View
0  sign_in_blue.png → static/sign_in_blue.png
File renamed without changes
View
0  statusPanel.html → static/statusPanel.html
File renamed without changes
View
0  user.html → static/user.html
File renamed without changes
View
0  user.png → static/user.png
File renamed without changes
View
0  worker.js → static/worker.js
File renamed without changes
View
0  workerScript.js → static/workerScript.js
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.