Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

NowJS and express compatibility. Fixed serving of nowjs files. #8

Merged
merged 1 commit into from

2 participants

@pritambaral

I tried out Space_Editor locally on my Node (v0.8.8) setup, and found my browser couldn't load now.js files. Using an explicit http server on another port, and suitable modifying editFile.html to load from that port worked, as explained on NowJS Readme.

Their FAQ mentions a way to make NowJS serving work with express, this pull request incorporates that.

Chhatoi Pritam Baral Fixed serving of NowJS 1e5a218
@chaoscollective chaoscollective merged commit c7a9a38 into chaoscollective:master
@chaoscollective

Thanks for the pull. Hopefully that will help others who are working with space, too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 1, 2012
  1. Fixed serving of NowJS

    Chhatoi Pritam Baral authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 app.js
View
4 app.js
@@ -56,7 +56,7 @@ app.get('/',function(req,res,next){
staticProvider(req, res, next);
});
var port = process.env.PORT || 3149;
-app.listen(port);
+var server = app.listen(port);
var EDITABLE_APPS_DIR = "/APPS/";
var ENABLE_LAUNCH = false;
@@ -418,7 +418,7 @@ app.get("/allUsersEditingProjects", function(req, res){
// ------------------------------------------------------------
var localFileIsMostRecent = []; // an array of flags indicating if the file has been modified since last save.
var nowjs = require("now");
-var everyone = nowjs.initialize(app);
+var everyone = nowjs.initialize(server);
// ------ REALTIME NOWJS COLLABORATION ------
//var nowcollab = require("../CHAOS/nowcollab");
//nowcollab.initialize(nowjs, everyone, true);
Something went wrong with that request. Please try again.