Skip to content

Commit 2d8b968

Browse files
committed
Init DB before challenges
1 parent 73867af commit 2d8b968

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

trainingportal/server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ const uid = require('uid-safe');
2626
const validator = require('validator');
2727

2828
const db = require(path.join(__dirname, 'db'));
29+
db.init();
30+
2931
const auth = require(path.join(__dirname, 'auth'));
3032
const util = require(path.join(__dirname, 'util'));
3133
var config = util.getConfig();
@@ -601,7 +603,6 @@ app.get('/api/report/:moduleId', async (req, res) => {
601603

602604
});
603605

604-
db.init();
605606

606607
process.on('SIGINT', function() {
607608
process.exit();

0 commit comments

Comments
 (0)