Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change default port(8080) of micronaut to something else?

Tags:

micronaut

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.

like image 855
RAJKUMAR NAGARETHINAM Avatar asked Apr 30 '19 07:04

RAJKUMAR NAGARETHINAM


People also ask

How do I change the port of a file?

From your product web console, navigate to Admin tab -> under Tools Settings -> Port Settings. You can now see the configured ports associated to various operations such as system manager, file transfer and more. You can edit the ports there and save your changes.


1 Answers

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 https://docs.micronaut.io/latest/guide/index.html#runningSpecificPort

like image 63
Szymon Stepniak Avatar answered Mar 02 '23 18:03

Szymon Stepniak