tomgoepfi8mo ago

How can I change the port in Fresh?

I have tried the following in the Main.ts await start(manifest, { port: 3000 }), But I suspect this solution is long outdated. Thx.
1 Reply
Deno AI Helper
Deno AI Helper8mo ago
According to the documentation, you can change the port in Fresh by modifying the start() call in main.ts to include an explicit port number. Here's an example:
await start(manifest, { port: 3000 });
await start(manifest, { port: 3000 });
Alternatively, you can also change the port by setting the PORT environment variable. Here's how you can do it:
$ PORT=3000 deno task start
$ PORT=3000 deno task start
Please ensure that you have the necessary permissions to bind to the desired port. 🦕