how can I run play framework with port=9001 under

2019-08-14 16:06发布

Under Play console, I can type "run 9001" to run a server in port 9001. But Under windows cmd, When I type "play run 9001", it does not work.

Please help .

3条回答
Animai°情兽
2楼-- · 2019-08-14 16:36

Run the following command to run play on required port.

  1. > play
  2. > run port_no i.e. example:- run 8080
查看更多
smile是对你的礼貌
3楼-- · 2019-08-14 16:44

it seems that the following command will fail, at least on windows

>play "run 9001"

what works for me is to start the play console by just typing

>play
[app01] $run 9001
查看更多
Bombasti
4楼-- · 2019-08-14 16:47

Write exactly like this (with quotas)

play "run 9001"

you can also add other options (again quotas are important)

play -DapplyEvolutions.default=true "start 9003"

Late edit:

On Windows you can try such trick to avoid error message 9001"" was unexpected at this time

play '-Dhttp.port=9004' 'run 9004'

or

play '-Dconfig.file=C:\apps\some-app\conf\other.conf' "run 9005"
查看更多
登录 后发表回答