INNER CODE UNIT · TypeScript

duration

aws-samples/bedrock-engineer · src/main/api/index.ts:72

    const duration = Date.now() - start
    apiLogger.debug(`${req.method} ${req.path}`, {
      method: req.method,
      path: req.path,
      statusCode: res.statusCode,
      duration: `${duration}ms`
    })
  })

  next()
})

api.get('/', (_req: Request, res: Response) => {
  res.send('Hello World')
})

interface CustomRequest<T> extends Request {
  body: T

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…