feat(tsview): add database and S3 handlers, tswatch/watch scripts, web utilities, assets and release config

This commit is contained in:
2026-01-25 11:02:53 +00:00
parent cf07f8cad9
commit afc32f3578
52 changed files with 1078 additions and 237 deletions

View File

@@ -23,15 +23,6 @@ export class ViewServer {
* Start the server
*/
public async start(): Promise<void> {
// Register API handlers
if (this.tsview.config.hasS3()) {
await registerS3Handlers(this.typedrouter, this.tsview);
}
if (this.tsview.config.hasMongo()) {
await registerMongoHandlers(this.typedrouter, this.tsview);
}
// Create typed server with bundled content
this.typedServer = new plugins.typedserver.TypedServer({
cors: true,
@@ -41,8 +32,14 @@ export class ViewServer {
noCache: true,
});
// Add the router
this.typedServer.typedrouter.addTypedRouter(this.typedrouter);
// Register API handlers directly to server's router
if (this.tsview.config.hasS3()) {
await registerS3Handlers(this.typedServer.typedrouter, this.tsview);
}
if (this.tsview.config.hasMongo()) {
await registerMongoHandlers(this.typedServer.typedrouter, this.tsview);
}
// Start server
await this.typedServer.start();