hostr/test/fixtures/mongo-file.js

13 lines
304 B
JavaScript
Raw Normal View History

2016-05-24 18:03:10 +01:00
const MongoClient = require('mongodb').MongoClient;
const url = 'mongodb://localhost:27017/hostr';
MongoClient.connect(url, function connect(err, db) {
const collection = db.collection('files');
collection.createIndex({
'owner': 1,
'status': 1,
'time_added': -1,
});
db.close();
2015-07-09 23:01:43 +01:00
});