Поправки от eslint
This commit is contained in:
@@ -29,7 +29,7 @@ function logQueries(app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function logErrors(app) {
|
function logErrors(app) {
|
||||||
app.use(function(err, req, res, next) {
|
app.use(function(err, req, res, next) {// eslint-disable-line no-unused-vars
|
||||||
log(LM_ERR, err.stack);
|
log(LM_ERR, err.stack);
|
||||||
res.status(500).send(err.stack);
|
res.status(500).send(err.stack);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ async function main() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//servers
|
||||||
for (let server of config.servers) {
|
for (let server of config.servers) {
|
||||||
if (server.mode !== 'none') {
|
if (server.mode !== 'none') {
|
||||||
app.listen(server.port, server.ip, function() {
|
app.listen(server.port, server.ip, function() {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
const log = require('./core/getLogger').getLog();
|
|
||||||
const c = require('./controllers');
|
const c = require('./controllers');
|
||||||
|
|
||||||
function initRoutes(app, connPool, config) {
|
function initRoutes(app, connPool, config) {
|
||||||
@@ -33,7 +32,7 @@ function initRoutes(app, connPool, config) {
|
|||||||
throw new Error(`initRoutes error: unknown httpMethod: ${httpMethod}`);
|
throw new Error(`initRoutes error: unknown httpMethod: ${httpMethod}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
initRoutes
|
initRoutes
|
||||||
|
|||||||
Reference in New Issue
Block a user