chore(): rename website/src -> website/server and website/public -> website/client (#7199)

This commit is contained in:
Matteo Pagliazzi
2016-05-13 15:35:12 +02:00
parent 486b93a3c9
commit 199732539f
504 changed files with 202 additions and 202 deletions

View File

@@ -0,0 +1,21 @@
import nconf from 'nconf';
import logger from './logger';
import autoinc from 'mongoose-id-autoinc';
import mongoose from 'mongoose';
import Bluebird from 'bluebird';
const IS_PROD = nconf.get('IS_PROD');
// Use Q promises instead of mpromise in mongoose
mongoose.Promise = Bluebird;
let mongooseOptions = !IS_PROD ? {} : {
replset: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
server: { socketOptions: { keepAlive: 120, connectTimeoutMS: 30000 } },
};
let db = mongoose.connect(nconf.get('NODE_DB_URI'), mongooseOptions, (err) => {
if (err) throw err;
logger.info('Connected with Mongoose.');
});
autoinc.init(db);