fixed linting

This commit is contained in:
mserranom 2020-03-06 17:03:17 +01:00
parent 6f931ee52b
commit d27275a3ab
3 changed files with 9 additions and 12 deletions

View file

@ -60,7 +60,7 @@ module.exports = MessageFormatter = {
} }
} }
for (let message of Array.from(messages)) { for (const message of Array.from(messages)) {
room = rooms_by_id[message.room_id.toString()] room = rooms_by_id[message.room_id.toString()]
if (room != null) { if (room != null) {
thread = getThread(room) thread = getThread(room)
@ -70,7 +70,7 @@ module.exports = MessageFormatter = {
} }
} }
for (let thread_id in threads) { for (const thread_id in threads) {
thread = threads[thread_id] thread = threads[thread_id]
thread.messages.sort((a, b) => a.timestamp - b.timestamp) thread.messages.sort((a, b) => a.timestamp - b.timestamp)
} }

View file

@ -23,12 +23,10 @@ app.use(metrics.http.monitor(logger))
metrics.injectMetricsRoute(app) metrics.injectMetricsRoute(app)
if (app.get('env') === 'development') { if (app.get('env') === 'development') {
console.log('Development Enviroment')
app.use(express.errorHandler({ dumpExceptions: true, showStack: true })) app.use(express.errorHandler({ dumpExceptions: true, showStack: true }))
} }
if (app.get('env') === 'production') { if (app.get('env') === 'production') {
console.log('Production Enviroment')
app.use(express.logger()) app.use(express.logger())
app.use(express.errorHandler()) app.use(express.errorHandler())
} }

View file

@ -1,24 +1,23 @@
module.exports = { module.exports = {
internal: { internal: {
chat: { chat: {
host: process.env['LISTEN_ADDRESS'] || 'localhost', host: process.env.LISTEN_ADDRESS || 'localhost',
port: 3010 port: 3010
} }
}, },
apis: { apis: {
web: { web: {
url: `http://${process.env['WEB_HOST'] || 'localhost'}:${process.env[ url: `http://${process.env.WEB_HOST || 'localhost'}:${process.env
'WEB_PORT' .WEB_PORT || 3000}`,
] || 3000}`, user: process.env.WEB_API_USER || 'sharelatex',
user: process.env['WEB_API_USER'] || 'sharelatex', pass: process.env.WEB_API_PASSWORD || 'password'
pass: process.env['WEB_API_PASSWORD'] || 'password'
} }
}, },
mongo: { mongo: {
url: url:
process.env['MONGO_CONNECTION_STRING'] || process.env.MONGO_CONNECTION_STRING ||
`mongodb://${process.env['MONGO_HOST'] || 'localhost'}/sharelatex` `mongodb://${process.env.MONGO_HOST || 'localhost'}/sharelatex`
} }
} }