fastify does not work on android emulator

Advertisements

I tried to use fastify with the android emu and I could not reach it with a GET request from the browser. I also tried express and it worked perfectly fine. I am a bit confused why express works and fastify does not. Please help.

>Solution :

You need to add the host parameter:

fastify.listen({ host: '0.0.0.0' })

It is written multiple times in the docs:

Leave a ReplyCancel reply