feat: use PORT environment variable to change port (#468)

This can be useful when deploying to other providers.

Also more convenient for projects with multiple developers with port
preferences

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
This commit is contained in:
Savin Angel-Mario
2023-06-05 09:08:46 +02:00
committed by GitHub
co-authored by Asher Gomez
parent 65e6385bc4
commit 6e1874ccca
3 changed files with 51 additions and 1 deletions
+6
View File
@@ -41,6 +41,12 @@ call in `main.ts` to include an explicit port number:
await start(manifest, { port: 3000 });
```
You can also change the port by setting the `PORT` environment variable:
```
$ PORT=3000 deno task start
```
Combining all of this we get the following `deno run` command:
```