Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit b2549e30f6006862ff9f15d7dd86160458f93d41 1 parent 5f468f2
@microp11 authored
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);
Please sign in to comment.
Something went wrong with that request. Please try again.