Update the deps to reap benefits from the patches
parent
c8bfd92f67
commit
390cffbf3c
@ -1,28 +1,30 @@
|
|||||||
import kill from "kill-port";
|
import kill from "kill-port";
|
||||||
import _locreq from "locreq";
|
import _locreq from "locreq";
|
||||||
import TheApp from "./app.js";
|
import TheApp from "./app.js";
|
||||||
import { SEALIOUS_SANITY } from "./config.js";
|
import { PORT, SEALIOUS_SANITY } from "./config.js";
|
||||||
import { mainRouter } from "./routes/index.js";
|
import { mainRouter } from "./routes/index.js";
|
||||||
import { module_dirname } from "./util.js";
|
import { module_dirname } from "./util.js";
|
||||||
const locreq = _locreq(module_dirname(import.meta.url));
|
const locreq = _locreq(module_dirname(import.meta.url));
|
||||||
|
|
||||||
const app = new TheApp();
|
const app = new TheApp();
|
||||||
|
|
||||||
kill(app.config["www-server"].port)
|
(async function () {
|
||||||
.then(() => app.start())
|
await kill(PORT);
|
||||||
.then(async () => {
|
await kill(PORT);
|
||||||
|
|
||||||
|
try {
|
||||||
|
app.HTTPServer.addStaticRoute("/", locreq.resolve("public"));
|
||||||
|
await app.start();
|
||||||
if (SEALIOUS_SANITY) {
|
if (SEALIOUS_SANITY) {
|
||||||
console.error("Exiting with error code 0");
|
console.error("Exiting with error code 0");
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
mainRouter(app.HTTPServer.router);
|
mainRouter(app.HTTPServer.router);
|
||||||
})
|
} catch (error) {
|
||||||
.catch((error) => {
|
|
||||||
console.error(error);
|
console.error(error);
|
||||||
if (SEALIOUS_SANITY) {
|
if (SEALIOUS_SANITY) {
|
||||||
console.error("EXITING WITH STATUS 1");
|
console.error("EXITING WITH STATUS 1");
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
})();
|
||||||
app.HTTPServer.addStaticRoute("/", locreq.resolve("public"));
|
|
||||||
|
Loading…
Reference in New Issue