Каркас будущего приложения

This commit is contained in:
Book Pauk
2022-08-16 14:54:41 +07:00
parent c3a0ce183e
commit 78be5a9856
22 changed files with 980 additions and 8 deletions

View File

@@ -105,6 +105,17 @@ async function main() {
function initStatic(app, config) {// eslint-disable-line
//загрузка файлов в /files
//TODO
app.use(express.static(config.publicDir, {
maxAge: '30d',
/*setHeaders: (res, filePath) => {
if (path.dirname(filePath) == filesDir) {
res.set('Content-Type', 'application/xml');
res.set('Content-Encoding', 'gzip');
}
},*/
}));
}
(async() => {