Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
¿Hay alguna manera fácil de obtener el cliente IP usando Deno.serveHttp?

Encontré este problema en el repositorio oficial. Pero en lugar de una forma directa, es más una implementación de oakserver. https://github.com/denoland/deno/discusiones/9314

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede convertir la dirección de la conexión como Deno.NetAddr y acceder al nombre de hostname (y al port si lo desea) allí:

 const server = Deno.listen({ port: 8080 }); for await (const conn of server) { (async () => { const httpConn = Deno.serveHttp(conn); const { hostname } = conn.remoteAddr as Deno.NetAddr; for await (const requestEvent of httpConn) { requestEvent.respondWith(new Response(hostname)); } })(); }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!