Files
ihasmail-inbuxa/server/src/index.ts
T
jcoffey-dev cfa661de20 INBUXA's name and site where the webmail still said ihasmail
- The sign-in footer names the build "INBUXA webmail" and links to
  inbuxa.org, next to its AGPL source link.
- About gives the INBUXA webmail version, and credits ihasmail on a line
  of its own.
- The user menu's "About ihasmail" is "About INBUXA", to inbuxa.org. The
  Documentation entry pointed at ihasmail's docs; it's gone until INBUXA
  has documentation of its own.
- The startup log says "mail server:" rather than naming the server
  software.

"About INBUXA" and "Built on {ihasmail}" are translated in all nine
catalogues.
2026-09-19 10:09:28 -07:00

28 lines
930 B
TypeScript

import { serve } from "@hono/node-server";
import { config } from "./config.js";
import { createApp, sessions } from "./app.js";
async function main() {
await sessions.init();
const app = createApp();
const server = serve({ fetch: app.fetch, hostname: config.host, port: config.port }, (info) => {
console.log(`[ihasmail] ${config.appName} listening on http://${info.address}:${info.port}`);
console.log(`[ihasmail] mail server: ${config.stalwartUrl}`);
console.log(`[ihasmail] static dir: ${config.staticDir}`);
});
const shutdown = async (signal: string) => {
console.log(`[ihasmail] ${signal} received, shutting down`);
server.close();
await sessions.close();
process.exit(0);
};
process.on("SIGINT", () => void shutdown("SIGINT"));
process.on("SIGTERM", () => void shutdown("SIGTERM"));
}
main().catch((err) => {
console.error("[ihasmail] fatal:", err);
process.exit(1);
});