Page MenuHomeSealhub

index.ts
No OneTemporary

index.ts

import _locreq from "locreq";
import Sealious from "sealious";
import TheApp from "./app";
import { mainRouter } from "./routes";
const locreq = _locreq(__dirname);
declare module "koa" {
interface BaseContext {
$context: Sealious.Context;
$app: TheApp;
$body: Record<string, unknown>;
}
}
const app = new TheApp();
app.start()
.then(async () => {
//populate scripts go here
if (process.env.SEALIOUS_SANITY === "true") {
console.log("Exiting with error code 0");
process.exit(0);
}
mainRouter(app.HTTPServer.router);
})
.catch((error) => {
console.error(error);
if (process.env.SEALIOUS_SANITY === "true") {
console.log("EXITING WITH STATUS 1");
process.exit(1);
}
});
app.HTTPServer.addStaticRoute("/", locreq.resolve("public"));

File Metadata

Mime Type
text/x-java
Expires
Fri, Jul 4, 05:23 (13 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
799771
Default Alt Text
index.ts (773 B)

Event Timeline