简单的scala playframework应用程序在heroku上不起作用 [英] Simple scala playframework app doesn't work on heroku

查看:147
本文介绍了简单的scala playframework应用程序在heroku上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试创建最基本的playframework应用程序,但出于某种原因,当我将其部署到heroku时,它看起来不正确。



主要问题似乎是:


  • 内容中没有数据

  • 找不到某些断言



有没有人有想法?

我的应用程序可以在这里找到: http://infinite-caverns-1800.herokuapp.com/



请参阅此处的代码 https://github.com/andersbe/herokuTest.git

解决方案

这个应用程序工作完美!



我可以看到您推送了默认视图(显示绿色的欢迎页面),但请记住,欢迎页面仅在开发模式下显示。在生产过程中,它被消息取代。您的新应用程序已准备就绪。



只需在 index.scala.html 文件将 @ play20.welcome(消息)替换为 bla bla bla 并再次推送到Heroku ...



注意,请停止本地机器上的应用程序,然后重新开始: play start - 你会看到与Heroku完全相同的信息。

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

解决方案

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.

这篇关于简单的scala playframework应用程序在heroku上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆