Turned off static routes since they are handled by nginx now.
This commit is contained in:
parent
a2feb95904
commit
9a974ee8dd
@ -3,7 +3,7 @@ const path = require("path");
|
|||||||
const Koa = require("koa");
|
const Koa = require("koa");
|
||||||
const koaPug = require("koa-pug");
|
const koaPug = require("koa-pug");
|
||||||
const koaRouter = require("koa-router");
|
const koaRouter = require("koa-router");
|
||||||
const koaServe = require("koa-static");
|
// const koaServe = require("koa-static");
|
||||||
const bodyParser = require("koa-body")({multipart: true});
|
const bodyParser = require("koa-body")({multipart: true});
|
||||||
const mysql = require("mysql");
|
const mysql = require("mysql");
|
||||||
const fetch = require("node-fetch");
|
const fetch = require("node-fetch");
|
||||||
@ -152,8 +152,8 @@ module.exports = () => {
|
|||||||
await ctx.render('500');
|
await ctx.render('500');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.use(koaServe(path.join("static", "shared")))
|
// .use(koaServe(path.join("static", "shared")))
|
||||||
.use(koaServe(path.join("static", "dwelling")))
|
// .use(koaServe(path.join("static", "dwelling")))
|
||||||
.use(dwelling_router.routes())
|
.use(dwelling_router.routes())
|
||||||
.listen(config.dwelling.port, config.dwelling.host);
|
.listen(config.dwelling.port, config.dwelling.host);
|
||||||
|
|
||||||
|
6
radio.js
6
radio.js
@ -4,7 +4,7 @@ const path = require("path");
|
|||||||
const Koa = require("koa");
|
const Koa = require("koa");
|
||||||
const koaPug = require("koa-pug");
|
const koaPug = require("koa-pug");
|
||||||
const koaRouter = require("koa-router");
|
const koaRouter = require("koa-router");
|
||||||
const koaServe = require("koa-static");
|
// const koaServe = require("koa-static");
|
||||||
const fetch = require("node-fetch");
|
const fetch = require("node-fetch");
|
||||||
|
|
||||||
const config = require("./config");
|
const config = require("./config");
|
||||||
@ -53,8 +53,8 @@ module.exports = () => {
|
|||||||
setRoutes(radio_router);
|
setRoutes(radio_router);
|
||||||
|
|
||||||
app
|
app
|
||||||
.use(koaServe(path.join("static", "shared")))
|
// .use(koaServe(path.join("static", "shared")))
|
||||||
.use(koaServe(path.join("static", "radio")))
|
// .use(koaServe(path.join("static", "radio")))
|
||||||
.use(radio_router.routes())
|
.use(radio_router.routes())
|
||||||
.listen(config.radio.port, config.radio.host);
|
.listen(config.radio.port, config.radio.host);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user