Removed emojis
parent
172127ae7f
commit
65dd73c549
|
@ -55,6 +55,7 @@ Tracman will be updated according to [this branching model](http://nvie.com/post
|
||||||
|
|
||||||
#### develop
|
#### develop
|
||||||
* [#110](https://github.com/Tracman-org/Server/issues/110) Implemented [StandardJS](https://standardjs.com/)
|
* [#110](https://github.com/Tracman-org/Server/issues/110) Implemented [StandardJS](https://standardjs.com/)
|
||||||
|
* Removed emojis
|
||||||
|
|
||||||
#### v0.7.12
|
#### v0.7.12
|
||||||
* Fixed altitude sign
|
* Fixed altitude sign
|
||||||
|
|
|
@ -19,8 +19,8 @@ module.exports = {
|
||||||
verify: () => {
|
verify: () => {
|
||||||
debug(`Verifying SMTP connection...`)
|
debug(`Verifying SMTP connection...`)
|
||||||
transporter.verify( (err,success) => {
|
transporter.verify( (err,success) => {
|
||||||
if (err){ console.error(`📧 SMTP ${err}`); }
|
if (err){ console.error(err.stack); }
|
||||||
console.log(`📧 SMTP${(success)?'':' not'} ready`)
|
console.log(`SMTP${(success)?'':' not'} ready`)
|
||||||
} )
|
} )
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ module.exports = {
|
||||||
// Throw error
|
// Throw error
|
||||||
throwErr: (err, req=null) => {
|
throwErr: (err, req=null) => {
|
||||||
debug(`throwErr(${err.message},${req.url})`)
|
debug(`throwErr(${err.message},${req.url})`)
|
||||||
console.error(`❌️ ${err.stack}`)
|
console.error(err.stack)
|
||||||
if (req){
|
if (req){
|
||||||
if (env.mode==='production') {
|
if (env.mode==='production') {
|
||||||
req.flash('danger', 'An error occured. <br>Would you like to <a href="https://github.com/Tracman-org/Server/issues/new">report it</a>?');
|
req.flash('danger', 'An error occured. <br>Would you like to <a href="https://github.com/Tracman-org/Server/issues/new">report it</a>?');
|
||||||
|
|
16
server.js
16
server.js
|
@ -32,8 +32,8 @@ const sockets = require('./config/sockets.js')
|
||||||
replset: {socketOptions: {
|
replset: {socketOptions: {
|
||||||
keepAlive: 1, connectTimeoutMS: 30000 }}
|
keepAlive: 1, connectTimeoutMS: 30000 }}
|
||||||
})
|
})
|
||||||
.then(() => { console.log(`💿 Mongoose connected to mongoDB`) })
|
.then(() => { console.log(`Mongoose connected to mongoDB`) })
|
||||||
.catch((err) => { console.error(`❌ ${err.stack}`) })
|
.catch((err) => { console.error(err.stack) })
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Templates */ {
|
/* Templates */ {
|
||||||
|
@ -125,7 +125,7 @@ const sockets = require('./config/sockets.js')
|
||||||
// Production handlers
|
// Production handlers
|
||||||
if (env.mode !== 'development') {
|
if (env.mode !== 'development') {
|
||||||
app.use((err, req, res, next) => {
|
app.use((err, req, res, next) => {
|
||||||
if (err.status !== 404 && err.status !== 401) { console.error(`❌ ${err.stack}`) }
|
if (err.status !== 404 && err.status !== 401) { console.error(err.stack) }
|
||||||
if (res.headersSent) { return next(err) }
|
if (res.headersSent) { return next(err) }
|
||||||
res.status(err.status || 500)
|
res.status(err.status || 500)
|
||||||
res.render('error', {
|
res.render('error', {
|
||||||
|
@ -137,7 +137,7 @@ const sockets = require('./config/sockets.js')
|
||||||
// Development handlers
|
// Development handlers
|
||||||
} else {
|
} else {
|
||||||
app.use((err, req, res, next) => {
|
app.use((err, req, res, next) => {
|
||||||
if (err.status !== 404) { console.error(`❌ ${err.stack}`) }
|
if (err.status !== 404) { console.error(err.stack) }
|
||||||
if (res.headersSent) { return next(err) }
|
if (res.headersSent) { return next(err) }
|
||||||
res.status(err.status || 500)
|
res.status(err.status || 500)
|
||||||
res.render('error', {
|
res.render('error', {
|
||||||
|
@ -154,14 +154,14 @@ const sockets = require('./config/sockets.js')
|
||||||
}
|
}
|
||||||
|
|
||||||
/* RUNTIME */
|
/* RUNTIME */
|
||||||
console.log('🖥 Starting Tracman server...')
|
console.log('Starting Tracman server...')
|
||||||
|
|
||||||
// Test SMTP server
|
// Test SMTP server
|
||||||
mail.verify()
|
mail.verify()
|
||||||
|
|
||||||
// Listen
|
// Listen
|
||||||
http.listen(env.port, () => {
|
http.listen(env.port, () => {
|
||||||
console.log(`🌐 Listening in ${env.mode} mode on port ${env.port}... `)
|
console.log(`Listening in ${env.mode} mode on port ${env.port}... `)
|
||||||
|
|
||||||
// Check for clients for each user
|
// Check for clients for each user
|
||||||
User.find({})
|
User.find({})
|
||||||
|
@ -170,9 +170,7 @@ http.listen(env.port, () => {
|
||||||
sockets.checkForUsers(io, user.id)
|
sockets.checkForUsers(io, user.id)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => { console.error(err.stack) })
|
||||||
console.error(`❌ ${err.stack}`)
|
|
||||||
})
|
|
||||||
|
|
||||||
// Start transmitting demo
|
// Start transmitting demo
|
||||||
demo(io)
|
demo(io)
|
||||||
|
|
Loading…
Reference in New Issue