mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
latest changes
This commit is contained in:
17
cli.js
Normal file
17
cli.js
Normal file
@ -0,0 +1,17 @@
|
||||
var fs = require('fs');
|
||||
|
||||
var env = 'prod',
|
||||
config = require('./config/config')[env],
|
||||
mongoose = require('mongoose'),
|
||||
Promise = require('bluebird');
|
||||
|
||||
// bootstrap db connection
|
||||
mongoose.set('debug', config.debug);
|
||||
mongoose.connect(config.database);
|
||||
|
||||
// bootstrap model
|
||||
var modelPath = __dirname + '/app/model'
|
||||
fs.readdirSync(modelPath).forEach(function (file) {
|
||||
require(modelPath + '/' + file)
|
||||
})
|
||||
|
Reference in New Issue
Block a user