Turned off static routes since they are handled by nginx now.

This commit is contained in:
Alexander Andreev 2021-02-10 02:02:28 +04:00
parent a2feb95904
commit 9a974ee8dd
Signed by: Arav
GPG Key ID: 610DF2574456329F
2 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ const path = require("path");
const Koa = require("koa");
const koaPug = require("koa-pug");
const koaRouter = require("koa-router");
const koaServe = require("koa-static");
// const koaServe = require("koa-static");
const bodyParser = require("koa-body")({multipart: true});
const mysql = require("mysql");
const fetch = require("node-fetch");
@ -152,8 +152,8 @@ module.exports = () => {
await ctx.render('500');
}
})
.use(koaServe(path.join("static", "shared")))
.use(koaServe(path.join("static", "dwelling")))
// .use(koaServe(path.join("static", "shared")))
// .use(koaServe(path.join("static", "dwelling")))
.use(dwelling_router.routes())
.listen(config.dwelling.port, config.dwelling.host);

View File

@ -4,7 +4,7 @@ const path = require("path");
const Koa = require("koa");
const koaPug = require("koa-pug");
const koaRouter = require("koa-router");
const koaServe = require("koa-static");
// const koaServe = require("koa-static");
const fetch = require("node-fetch");
const config = require("./config");
@ -53,8 +53,8 @@ module.exports = () => {
setRoutes(radio_router);
app
.use(koaServe(path.join("static", "shared")))
.use(koaServe(path.join("static", "radio")))
// .use(koaServe(path.join("static", "shared")))
// .use(koaServe(path.join("static", "radio")))
.use(radio_router.routes())
.listen(config.radio.port, config.radio.host);