hostr/test/fixtures/mongo-file.js

12 lines
275 B
JavaScript
Raw Normal View History

2016-08-07 14:38:05 +01:00
const MongoClient = require('mongodb').MongoClient;
MongoClient.connect(process.env.MONGO_URL, function connect(err, db) {
const collection = db.collection('files');
collection.createIndex({
'owner': 1,
'status': 1,
'time_added': -1,
});
db.close();
});