diff options
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -7,7 +7,6 @@ | |||
7 | var expressValidator = require('express-validator') | 7 | var expressValidator = require('express-validator') |
8 | var http = require('http') | 8 | var http = require('http') |
9 | var morgan = require('morgan') | 9 | var morgan = require('morgan') |
10 | var multer = require('multer') | ||
11 | var path = require('path') | 10 | var path = require('path') |
12 | var TrackerServer = require('bittorrent-tracker').Server | 11 | var TrackerServer = require('bittorrent-tracker').Server |
13 | var WebSocketServer = require('ws').Server | 12 | var WebSocketServer = require('ws').Server |
@@ -44,7 +43,6 @@ | |||
44 | 43 | ||
45 | // Get configurations | 44 | // Get configurations |
46 | var port = config.get('listen.port') | 45 | var port = config.get('listen.port') |
47 | var uploads = config.get('storage.uploads') | ||
48 | 46 | ||
49 | // ----------- Command line ----------- | 47 | // ----------- Command line ----------- |
50 | 48 | ||
@@ -54,8 +52,6 @@ | |||
54 | app.use(morgan('combined', { stream: logger.stream })) | 52 | app.use(morgan('combined', { stream: logger.stream })) |
55 | // For body requests | 53 | // For body requests |
56 | app.use(bodyParser.json()) | 54 | app.use(bodyParser.json()) |
57 | // For POST file requests | ||
58 | app.use(multer({ dest: uploads })) | ||
59 | app.use(bodyParser.urlencoded({ extended: false })) | 55 | app.use(bodyParser.urlencoded({ extended: false })) |
60 | // Validate some params for the API | 56 | // Validate some params for the API |
61 | app.use(expressValidator({ | 57 | app.use(expressValidator({ |