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