Reputation: 1528
How to change default port 8080
in Micronaut to something else? I use Micronaut for my project, and I cannot find the configuration for changing the port number.
Upvotes: 30
Views: 18271
Reputation: 42234
You can specify a custom server port in src/main/resources/application.yml
file, for instance:
micronaut:
server:
port: 8081
Alternatively, you can set up an environment variable MICRONAUT_SERVER_PORT
.
For more information, check the official documentation page for running on a specific port.
Upvotes: 47