Simple scala playframework app doesn't work on

2019-08-07 17:22发布

问题:

I've tried creating the most basic playframework app possible, but for some reason it doesn't look right when I deploy it to heroku.

The main problems seems to be:

  • No data in content
  • Some asserts are not found

Does anyone have an idea?

My application can be found here: http://infinite-caverns-1800.herokuapp.com/

See the code here https://github.com/andersbe/herokuTest.git

回答1:

This app is working perfect!

I can see that you pushed default view (which displays green 'welcome page') BUT keep in mind that the welcome page is displayed ONLY in dev mode. In production it's replaced with the message Your new application is ready.

Just in the index.scala.html file replace the line @play20.welcome(message) with bla bla bla and push again to the Heroku...

Nota bene, stop the app on your local machine and start again with: play start - you'll see exactly the same message as on Heroku.