Permalink
Browse files

Convert server to a heroku app

  • Loading branch information...
1 parent b8de931 commit 4c445fa8a41f2467d6ab778a5024927cdb42a83d @anantn committed Oct 23, 2012
View
@@ -0,0 +1 @@
+web: node app.js
View
@@ -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
@@ -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
@@ -1,10 +0,0 @@
-{
- "services": {
- "social": {
- "name": "Demo Social Service",
- "iconURL": "/icon.png",
- "workerURL": "/worker.js",
- "sidebarURL": "/sidebar.htm",
- }
- }
-}
View
@@ -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"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
View
@@ -0,0 +1,10 @@
+{
+ "services": {
+ "social": {
+ "name": "WebRTC Social Demo",
+ "iconURL": "/static/icon.png",
+ "workerURL": "/static/worker.js",
+ "sidebarURL": "/static/sidebar.htm",
+ }
+ }
+}
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.

0 comments on commit 4c445fa

Please sign in to comment.