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
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:
Alternatively, you can also change the port by setting the PORT
environment variable. Here's how you can do it:
Please ensure that you have the necessary permissions to bind to the desired port. 🦕