Add indexes

This commit is contained in:
syuilo 2019-03-04 19:26:05 +09:00
parent d1a18fe266
commit ea86527c66
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -3,6 +3,8 @@ import db from '../db/mongodb';
const Log = db.get<ILog>('logs');
Log.createIndex('createdAt', { expireAfterSeconds: 3600 * 24 * 3 });
Log.createIndex('level');
Log.createIndex('domain');
export default Log;
export interface ILog {