Use express

This commit is contained in:
Mattias Erming 2014-09-26 15:12:53 -07:00
parent 96fcfcfdcc
commit 4c94a67d49
2 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
{
"name": "shout",
"description": "The self-hosted web IRC client",
"version": "0.35.1",
"version": "0.36.0",
"author": "Mattias Erming",
"preferGlobal": true,
"bin": {
@ -35,6 +35,7 @@
"bcrypt": "^0.8.0",
"commander": "^2.3.0",
"connect": "~2.19.6",
"express": "^4.9.5",
"lodash": "~2.4.1",
"mkdirp": "^0.5.0",
"moment": "~2.7.0",

View File

@ -3,8 +3,8 @@ var bcrypt = require("bcrypt");
var Client = require("./client");
var ClientManager = require("./clientManager");
var config = require("../config");
var express = require("express");
var fs = require("fs");
var http = require("connect");
var io = require("socket.io");
var Helper = require("./helper");
@ -16,10 +16,10 @@ module.exports = function(port, host, isPublic) {
config.host = host;
config.public = isPublic;
var app = http()
var app = express()
.use(index)
.use(http.static("client"))
.use(http.static(Helper.resolveHomePath("cache")))
.use(express.static("client"))
.use(express.static(Helper.resolveHomePath("cache")))
.listen(config.port, config.host);
sockets = io(app);