Yes it is possible. Declare your dev routes in conf/routes
, but declare your production routes in conf/prod.routes
. Then, have a production configuration file, conf/prod.conf
, and put this in it:
include "application.conf"
application.router = "prod.Routes"
Now, when you start your application in production, simply use:
path/to/myapp/bin/myapp -Dconfig.resource=prod.conf -Dhttp.port=...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…