mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 19:21:51 +00:00
01ee104f77
This reverts commit 7b05891ba0e87e4cf00fd6b1ea87d7406dc70989.
16 lines
517 B
CoffeeScript
16 lines
517 B
CoffeeScript
mongoose = require('mongoose')
|
|
Settings = require 'settings-sharelatex'
|
|
logger = require('logger-sharelatex')
|
|
|
|
mongoose.connect(Settings.mongo.url, server: poolSize: 10)
|
|
|
|
mongoose.connection.on 'connected', () ->
|
|
logger.log {url:Settings.mongo.url}, 'mongoose default connection open'
|
|
|
|
mongoose.connection.on 'error', (err) ->
|
|
logger.err err:err, 'mongoose error on default connection';
|
|
|
|
mongoose.connection.on 'disconnected', () ->
|
|
logger.log 'mongoose default connection disconnected'
|
|
|
|
module.exports = mongoose
|