async function try_doing_something_with(my_req: Request, my_cible: string): void {
// ...
await sleep(555);
}
router.get("/:cible/simple", async (ctx) => {
ctx.response.status = 200;
ctx.response.type = "text/plain";
ctx.response.body = "don't panic, process is started";
// send reply now.
try_doing_something_with(ctx.request, ctx.params.cible);
});
async function try_doing_something_with(my_req: Request, my_cible: string): void {
// ...
await sleep(555);
}
router.get("/:cible/simple", async (ctx) => {
ctx.response.status = 200;
ctx.response.type = "text/plain";
ctx.response.body = "don't panic, process is started";
// send reply now.
try_doing_something_with(ctx.request, ctx.params.cible);
});