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