cairo/lib/vix/AppRouter.ts
Dunemask 0fc5f05b6a
Some checks failed
Deploy Edge / deploy-edge (push) Failing after 2s
S3 Repo Backup / s3-repo-backup (push) Failing after 2s
[INIT] Initial Project Structure
2024-08-24 12:41:04 -06:00

15 lines
639 B
TypeScript

import "express-async-errors";
import config from "@lib/config";
import { VixpressRouter } from "@dunemask/vix";
import { AuthRoute } from "@lib/modules/auth/auth.router";
import { ProjectRoute } from "@lib/modules/projects/project.router";
export default class AppRouter extends VixpressRouter {
protected routerImportUrl = import.meta.url; // Used to configure the relative static route
protected baseUrl = config.Server.basePath; // Path for static assets
async configureRoutes() {
// API Routes go here:
await this.useRoute("/api/:project/auth", AuthRoute);
await this.useRoute("/api/:project", ProjectRoute);
}
}