Commit 1f5f081f by Johannes Zellner

fix deprecation warnings

1 parent dedd6766
Showing with 4 additions and 5 deletions
...@@ -24,8 +24,8 @@ var router = new express.Router(); ...@@ -24,8 +24,8 @@ var router = new express.Router();
var multipart = multipart({ maxFieldsSize: 2 * 1024, limit: '512mb', timeout: 3 * 60 * 1000 }); var multipart = multipart({ maxFieldsSize: 2 * 1024, limit: '512mb', timeout: 3 * 60 * 1000 });
router.get('/api/files/*', auth.ldap, files.get); router.get ('/api/files/*', auth.ldap, files.get);
router.put('/api/files/*', auth.ldap, multipart, files.put); router.put ('/api/files/*', auth.ldap, multipart, files.put);
router.delete('/api/files/*', auth.ldap, files.del); router.delete('/api/files/*', auth.ldap, files.del);
// welcome screen in case / does not serve up any file yet // welcome screen in case / does not serve up any file yet
...@@ -37,15 +37,14 @@ app.use(compression()); ...@@ -37,15 +37,14 @@ app.use(compression());
app.use('/settings', express.static(__dirname + '/app')); app.use('/settings', express.static(__dirname + '/app'));
app.use(express.static(path.resolve(__dirname, process.argv[2] || 'files'))); app.use(express.static(path.resolve(__dirname, process.argv[2] || 'files')));
app.use(bodyParser.json()); app.use(bodyParser.json());
app.use(bodyParser.urlencoded()); app.use(bodyParser.urlencoded({ extended: false, limit: '100mb' }));
app.use(cookieParser()); app.use(cookieParser());
app.use(session({ secret: 'surfin surfin' })); app.use(session({ secret: 'surfin surfin', resave: false, saveUninitialized: false }));
app.use(passport.initialize()); app.use(passport.initialize());
app.use(passport.session()); app.use(passport.session());
app.use(router); app.use(router);
app.use(lastMile()); app.use(lastMile());
var server = app.listen(3000, function () { var server = app.listen(3000, function () {
var host = server.address().address; var host = server.address().address;
var port = server.address().port; var port = server.address().port;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!