OGeek|极客世界-中国程序员成长平台

标题: Is there a working nodejs/phantomjs Heroku buildpack? [打印本页]

作者: 菜鸟教程小白    时间: 2022-5-28 10:47
标题: Is there a working nodejs/phantomjs Heroku buildpack?

I'd like to deploy an app with a Procfile that runs

web: node myapp.js

Where myapp.js uses phantomjs-node to run headless webkit stuff, returning the results to browser requests. Is this possible?



Best Answer-推荐答案


I also ran into the same problem, the way I fixed it was by using this "Multiple Buildpack" Buildpack. Then in my .buildpacks file I put the following:

http://github.com/heroku/heroku-buildpack-nodejs.git
http://github.com/stomita/heroku-buildpack-phantomjs.git

Finally, you want to add PhantomJS to the path

heroku config:set PATH=$PATH:vendor/phantomjs/bin

I hope this helps.






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://www.ogeek.cn/) Powered by Discuz! X3.4