#Cannot access web server from other network devices when compiled

9 messages · Page 1 of 1 (latest)

vagrant fern
#

Hello. Im kinda new to deno and i just compiled my first bigger project with deno, but when the task is running, i can access the website directly from my pc, but not from my phone, which is in the same network.
This is my code:

import {serve} from "https://deno.land/[email protected]/http/server.ts";
serve(handler, {port: Number(env.PORT), onListen: () => console.log(`Listening on http://localhost:${env.PORT}`)});
rich leaf
#

I guess if you ran the file directly through Deno without compilation it would work?

vagrant fern
#

Forgot to add that to my message, but yes

#

Works wo/ any issues

#

Without compilation (just deno run main.ts), it works completely fine

rich leaf
#

Which OS do u use?

vagrant fern
#

Windows 11 22H2 22621.1702 64bit

rich leaf
#

Works for me on Linux, maybe has something to do with the windows compile system...

vagrant fern
#

Is there an update to this?