Skip to content

Commit

Permalink
fix(install): server crash due to invalid middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Nov 7, 2018
1 parent f01cf82 commit 88367d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/views/install.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
padding: 15px 0;
}
h2 {
color: #444 !important;
}
p {
font-family: "Roboto", Arial, sans-serif;
font-weight: 300;
Expand Down
8 changes: 4 additions & 4 deletions src/webserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ var async = require('async'),
app.set('view engine', 'hbs');
hbsHelpers.register(hbs.handlebars);

app.use('/assets', express.static(nconf.get('base_dir') + '/public/uploads/assets'));
app.use('/uploads', middleware.redirectToLogin, express.static(nconf.get('base_dir') + '/public/uploads'));
app.use('/assets', express.static(path.join(__dirname, '../public/uploads/assets')));
app.use('/uploads', routeMiddleware.redirectToLogin, express.static(path.join(__dirname, '../public/uploads')));

app.use(express.static(nconf.get('base_dir') + '/public'));
app.use(favicon(nconf.get('base_dir') + '/public/img/favicon.ico'));
app.use(express.static(path.join(__dirname, '../public')));
app.use(favicon(path.join(__dirname, '../public/img/favicon.ico')));
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());

Expand Down

0 comments on commit 88367d9

Please sign in to comment.