Commit project

This commit is contained in:
Rodrigo Pedroso 2019-06-19 10:46:14 -04:00
commit 3ac017a5ad
1030 changed files with 94062 additions and 0 deletions

18
models/index.js Normal file
View file

@ -0,0 +1,18 @@
const mongoose = require('mongoose');
module.exports.connect = (uri) => {
mongoose.connect(uri, {
useMongoClient: true,
});
// plug in the promise library:
mongoose.Promise = require('bluebird');
mongoose.connection.on('error', (err) => {
console.error(`Mongoose connection error: ${err}`);
process.exit(1);
});
// load models
require('./merchant');
};