Files
hikari/server/src/routes/base.ts

24 lines
655 B
TypeScript

/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import type { FastifyPluginAsync } from "fastify";
/**
* Mounts the entry routes for the application. These routes
* should not require CORS, as they are used by external services
* such as our uptime monitor.
* @param server - The Fastify server instance.
*/
export const baseRoutes: FastifyPluginAsync = async(server) => {
server.get("/", async(_request, reply) => {
return await reply.redirect("https://hikari.nhcarrigan.com");
});
server.get("/health", async(_request, reply) => {
return await reply.status(200).send("OK~!");
});
};