fix(core): update

This commit is contained in:
Philipp Kunz 2020-07-26 13:54:46 +00:00
parent f7205e2f29
commit 7c4db19825

View File

@ -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();
}