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