fix(core): update
This commit is contained in:
parent
f7205e2f29
commit
7c4db19825
@ -19,17 +19,21 @@ export class AgTestServer {
|
||||
public async start() {
|
||||
this.server = new plugins.smartexpress.Server({
|
||||
cors: true,
|
||||
forceSsl: false,
|
||||
defaultAnswer: async () => 'apiglobal testserver',
|
||||
domain: 'localhost',
|
||||
port: 3000,
|
||||
forceSsl: false,
|
||||
});
|
||||
for (const handlerArg of this.handlers) {
|
||||
console.log(`found handler with slug ${handlerArg.slug}`);
|
||||
await handlerArg.start();
|
||||
console.log(`started handler with slug ${handlerArg.slug}`);
|
||||
const slugroute = `/${handlerArg.slug}`;
|
||||
this.server.addRoute(
|
||||
`/${handlerArg.slug}`,
|
||||
slugroute,
|
||||
new plugins.smartexpress.HandlerTypedRouter(handlerArg.typedrouter)
|
||||
);
|
||||
console.log(`added slugroute ${slugroute}`);
|
||||
}
|
||||
await this.server.start();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user