15 lines
639 B
TypeScript
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);
|
|
}
|
|
}
|