Permalink
Browse files

Merge pull request #52 from microp11/master

Fix for CORS!
  • Loading branch information...
2 parents fe8b1cc + b2549e3 commit b764e8d3b81255a9b966de9ae2025937b1eee6da @chrismatthieu chrismatthieu committed Apr 23, 2012
Showing with 4 additions and 1 deletion.
  1. 0 {public → }/index.html
  2. +4 −1 irc.js
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 b764e8d

Please sign in to comment.