db.js 258 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 const config = require('./config'); const db = require('monk')(config.db); module.exports = db; db.then(async() => { await db.get('board').createIndex({name: 1}, {unique: true}); await db.get('thread').createIndex({board: 1, lastUpdated: -1}); });