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