Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NodeJs app with Java on Heroku

I have build my first NodeJS app with Express and am running it on C9 without any issues.

The app uses a Node Package (easy-pdf-merge) which requires at least Java 6.

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.

I have read a little about buildpacks but I'm not sure on the direction here.

Unless there is a simpler way to merge PDFs of course.

Thanks

Stu

like image 397
StuP Avatar asked Mar 05 '23 18:03

StuP


1 Answers

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.

like image 170
codefinger Avatar answered Mar 14 '23 18:03

codefinger