How to change the default port 8080 for vapor 4 using Terminal?

Hi,

I bought the book for vapor 4 and I can’t find anywhere on the book on how to change the default port 8080 for vapor 4, there used to be a way to run vapor on a different port on Vapor 3 by running on terminal vapor run --port=8080 but I don’t think that’s possible anymore since I keep getting this error error: terminated(72): XPC_SERVICE_NAME=0 HOME=/Users...

is there a new way to run vapor under a different port… e.i: port 8090?

Thanks!.

In configure.swift you can do:

app.http.server.configuration.port = 8090