Can I specify ninja.port in config file?

228 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 answers

1
Ra_ 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
Jordi Castilla 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