6.2 Running Server on a Specific Port
By default the server runs on port 8080. However, you can set the server to run on a specific port:
micronaut:
server:
port: 8086
This is also possible to be configured from an environment variable: MICRONAUT_SERVER_PORT=8086 |
To run on a random port:
micronaut:
server:
port: -1