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