diff options
Diffstat (limited to 'src/server/index.ts')
-rw-r--r-- | src/server/index.ts | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index e39dfcc14..fd66c90b4 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -2,7 +2,6 @@ import * as bodyParser from 'body-parser'; import { exec } from 'child_process'; import * as cookieParser from 'cookie-parser'; import * as express from 'express'; -import * as https from 'https'; import * as session from 'express-session'; import * as expressValidator from 'express-validator'; import * as formidable from 'formidable'; @@ -173,8 +172,6 @@ const pngTypes = [".png", ".PNG"]; const jpgTypes = [".jpg", ".JPG", ".jpeg", ".JPEG"]; const uploadDir = __dirname + "/public/files/"; // SETTERS -//TODO This should be a secured route, but iPhones don't seem to deal well with out authentication, -// so in order for the image upload from phones to work, we can make this authenticated app.post( RouteStore.upload, (req, res) => { @@ -292,13 +289,10 @@ app.use(wdm(compiler, { publicPath: config.output.publicPath })); app.use(whm(compiler)); // start the Express server -const httpsServer = https.createServer({ - key: fs.readFileSync(__dirname + '/server.key'), - cert: fs.readFileSync(__dirname + '/server.cert') -}, app).listen(port, () => +app.listen(port, () => console.log(`server started at http://localhost:${port}`)); -const server = io(httpsServer); +const server = io(); interface Map { [key: string]: Client; } @@ -447,5 +441,5 @@ function CreateField(newValue: any) { Database.Instance.insert(newValue, "newDocuments"); } -// server.listen(serverPort); -// console.log(`listening on port ${serverPort}`);
\ No newline at end of file +server.listen(serverPort); +console.log(`listening on port ${serverPort}`);
\ No newline at end of file |