[英]NodeJs app with Java on Heroku
I have build my first NodeJS app with Express and am running it on C9 without any issues. 我已经使用Express构建了我的第一个NodeJS应用程序,并且可以在C9上运行它而没有任何问题。
The app uses a Node Package ( easy-pdf-merge
) which requires at least Java 6. 该应用程序使用至少需要Java 6的Node Package(
easy-pdf-merge
)。
On pushing my code up to Heroku I get an error at the point of the merge process saying I don't have Java install on this Dyno. 将我的代码推送到Heroku时,在合并过程中出现错误,提示我在此Dyno上没有安装Java。
I have read a little about buildpacks but I'm not sure on the direction here. 我已经阅读了一些有关buildpack的信息,但是我不确定这里的方向。
Unless there is a simpler way to merge PDFs of course. 当然,除非有更简单的方法来合并PDF。
Thanks 谢谢
Stu 斯图
Run the following command: 运行以下命令:
$ heroku buildpacks:clear
$ heroku buildpacks:add heroku/jvm
$ heroku buildpacks:add heroku/nodejs
Then redeploy by running 然后通过运行重新部署
$ git commit -m "redeploy" --allow-empty
$ git push heroku master
After the build, the JVM will be installed in your app, and available for use. 构建之后,JVM将安装在您的应用程序中并可供使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.