Change port for Fresh (Deno) webserver

1.3k Views Asked by At

My server keeps listening to port 8000, even after I’ve modified the main.tsx to include:

await start(manifest, { port: 3000 });
1

There are 1 best solutions below

0
On

I guess you have added that line after the existing

await start(manifest, { render });

Then it doesn't work. Instead modify the existing line to

await start(manifest, { render, port: 3000 });

I did it after the server was started with

deno task start

and got

Watcher File change detected! Restarting!
Server listening on http://localhost:3000