18 lines
468 B
TypeScript
18 lines
468 B
TypeScript
/**
|
|
* Standalone server for the Maps module.
|
|
* Serves rmaps.online independently.
|
|
*/
|
|
|
|
import { Hono } from "hono";
|
|
import { serveStatic } from "hono/bun";
|
|
import { mapsModule } from "./mod";
|
|
|
|
const app = new Hono();
|
|
|
|
app.use("/modules/maps/*", serveStatic({ root: "./dist" }));
|
|
app.use("/*", serveStatic({ root: "./dist" }));
|
|
app.route("/", mapsModule.routes);
|
|
|
|
console.log(`[rMaps Standalone] Listening on :3000`);
|
|
export default { port: 3000, fetch: app.fetch };
|