Вынес publicDir в конфиг
This commit is contained in:
@@ -7,6 +7,7 @@ module.exports = {
|
|||||||
tempDir: execPath + '/tmp',
|
tempDir: execPath + '/tmp',
|
||||||
logDir: execPath + '/log',
|
logDir: execPath + '/log',
|
||||||
dataDir: execPath + '/data',
|
dataDir: execPath + '/data',
|
||||||
|
publicDir: execPath + '/public',
|
||||||
dbFileName: 'db.sqlite',
|
dbFileName: 'db.sqlite',
|
||||||
loggingEnabled: true,
|
loggingEnabled: true,
|
||||||
|
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ module.exports = Object.assign({}, base, {
|
|||||||
tempDir: execPath + '/tmp',
|
tempDir: execPath + '/tmp',
|
||||||
logDir: execPath + '/log',
|
logDir: execPath + '/log',
|
||||||
dataDir: execPath + '/data',
|
dataDir: execPath + '/data',
|
||||||
|
publicDir: execPath + '/public',
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ async function main() {
|
|||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use(express.static('public'));
|
app.use(express.static(config.publicDir));
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
|
|
||||||
require('./routes').initRoutes(app, connPool, config);
|
require('./routes').initRoutes(app, connPool, config);
|
||||||
|
|||||||
Reference in New Issue
Block a user