From 4c94a67d49bd9c7138b7892cee63734c19c19315 Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Fri, 26 Sep 2014 15:12:53 -0700 Subject: [PATCH] Use express --- package.json | 3 ++- src/server.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c0c43ea5..83c5c343 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/server.js b/src/server.js index 01a90117..d5996156 100644 --- a/src/server.js +++ b/src/server.js @@ -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);