Use express
This commit is contained in:
parent
96fcfcfdcc
commit
4c94a67d49
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "shout",
|
"name": "shout",
|
||||||
"description": "The self-hosted web IRC client",
|
"description": "The self-hosted web IRC client",
|
||||||
"version": "0.35.1",
|
"version": "0.36.0",
|
||||||
"author": "Mattias Erming",
|
"author": "Mattias Erming",
|
||||||
"preferGlobal": true,
|
"preferGlobal": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -35,6 +35,7 @@
|
|||||||
"bcrypt": "^0.8.0",
|
"bcrypt": "^0.8.0",
|
||||||
"commander": "^2.3.0",
|
"commander": "^2.3.0",
|
||||||
"connect": "~2.19.6",
|
"connect": "~2.19.6",
|
||||||
|
"express": "^4.9.5",
|
||||||
"lodash": "~2.4.1",
|
"lodash": "~2.4.1",
|
||||||
"mkdirp": "^0.5.0",
|
"mkdirp": "^0.5.0",
|
||||||
"moment": "~2.7.0",
|
"moment": "~2.7.0",
|
||||||
|
@ -3,8 +3,8 @@ var bcrypt = require("bcrypt");
|
|||||||
var Client = require("./client");
|
var Client = require("./client");
|
||||||
var ClientManager = require("./clientManager");
|
var ClientManager = require("./clientManager");
|
||||||
var config = require("../config");
|
var config = require("../config");
|
||||||
|
var express = require("express");
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
var http = require("connect");
|
|
||||||
var io = require("socket.io");
|
var io = require("socket.io");
|
||||||
var Helper = require("./helper");
|
var Helper = require("./helper");
|
||||||
|
|
||||||
@ -16,10 +16,10 @@ module.exports = function(port, host, isPublic) {
|
|||||||
config.host = host;
|
config.host = host;
|
||||||
config.public = isPublic;
|
config.public = isPublic;
|
||||||
|
|
||||||
var app = http()
|
var app = express()
|
||||||
.use(index)
|
.use(index)
|
||||||
.use(http.static("client"))
|
.use(express.static("client"))
|
||||||
.use(http.static(Helper.resolveHomePath("cache")))
|
.use(express.static(Helper.resolveHomePath("cache")))
|
||||||
.listen(config.port, config.host);
|
.listen(config.port, config.host);
|
||||||
|
|
||||||
sockets = io(app);
|
sockets = io(app);
|
||||||
|
Loading…
Reference in New Issue
Block a user