ptzoptics-node-server/app/_helpers/db.js

12 lines
345 B
JavaScript
Raw Normal View History

2018-11-02 15:24:39 -04:00
/*jshint esversion: 6 */
const path = require('path');
const config = require(path.resolve(__dirname, '../config.json'));
const mongoose = require('mongoose');
mongoose.connect(config.connectionString, {useNewUrlParser: true });
mongoose.Promise = global.Promise;
module.exports = {
Camera: require('../camera/camera.model')
};