Routing
Routing is directory-based. You can make as many folders with routes as you want in the source code directory.
After creating routes directory
import type { ArcRequest, ArcResponse } from "@arcend/core";
const GET = async(req: ArcRequest, res: ArcResponse) =>
{
return {
path: req.path
};
};
export { GET };
// {path: '/'}import type { ArcRequest, ArcResponse } from "@arcend/core";
const POST = async(req: ArcRequest, res: ArcResponse) =>
{
return {
path: req.path
};
};
export { POST };
// {path: '/user'}Last updated

