Can I specify ninja.port in config file?

255 Views Asked by At

Is it possible to specify the port my application will listen to in config file? I know I can use java -Dninja.port=8765 MyNinjaApp.jar from command line, but is it possible to do it in config file?

2

There are 2 best solutions below

1
On BEST ANSWER

No - that's currently not possible (Ninja 5.1.2).

There are ways to implement that however. Let's discuss on our mailing list if you are interested.

3
On

By convention Ninja will look for a configuration file at conf/application.conf.

File application.conf is a simple properties file with keys and values. To configure port:

serverPort=8765

Take a look here