rspace-online/modules/vote/standalone.ts

18 lines
468 B
TypeScript

/**
* Standalone server for the Vote module.
* Serves rvote.online independently.
*/
import { Hono } from "hono";
import { serveStatic } from "hono/bun";
import { voteModule } from "./mod";
const app = new Hono();
app.use("/modules/vote/*", serveStatic({ root: "./dist" }));
app.use("/*", serveStatic({ root: "./dist" }));
app.route("/", voteModule.routes);
console.log(`[rVote Standalone] Listening on :3000`);
export default { port: 3000, fetch: app.fetch };