How to get request ip in ElysiaJs?

340 Views Asked by At

I'm trying to find something like this

router.get('/', async (ctx, next) => {
  const clientIP = ctx.request.ip;
  ctx.body = `Hello World ${clientIP}`;
})
app.onRequest((context) => {
  const ip = context.request.credentials;
  console.log(ip);
});
0

There are 0 best solutions below