Permalink
Browse files

Moved index.html in a different location to fix rendering CORS.

replaced render with a lesser way of serving files, nonetheless sufficient for our app.
  • Loading branch information...
1 parent 5f468f2 commit b2549e30f6006862ff9f15d7dd86160458f93d41 Paul Maxan committed Apr 23, 2012
Showing with 4 additions and 1 deletion.
  1. 0 {public → }/index.html
  2. +4 −1 irc.js
View
0 public/index.html → index.html
File renamed without changes.
View
5 irc.js
@@ -21,6 +21,7 @@
var express = require("express"),
sio = require("socket.io"),
+ fs = require("fs"),
Proxy = require("./tcp-proxy");
var app = module.exports = express.createServer();
@@ -65,7 +66,9 @@ process.on("uncaughtException", function (err) {
});
app.get("/", function (req, res, next) {
- res.render("./public/index.html");
+ fs.readFile(__dirname + '/index.html', 'utf8', function (err, text) {
+ res.send(text);
+ });
});
app.listen(process.env.C9_PORT || process.env['app_port'] || 80);

0 comments on commit b2549e3

Please sign in to comment.