Skip to content

resource/lab-node-heroku-urltoimage

Repository files navigation

lab-node-heroku-urltoimage

Converting a URL to an image on Heroku with PhantomJS and ExpressJS is surprisingly easy. Just takes a little bit of finesse with Buildpacks on Heroku.

Local

Run this experiment locally

[~] mkdir test && cd test
[~/test] git clone https://github.com/resource/lab-node-heroku-urltoimage.git .
[~/test] npm install
[~/test] foreman start
[~/test] open http://localhost:5000/render

Heroku

Run this experiment on Heroku

[~/test] heroku apps:create
[~/test] heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
[~/test] heroku config:add PHANTOMJS_PATH=/app/vendor/phantomjs/bin/phantomjs
[~/test] git push heroku master
[~/test] source bin/open

Bonus

Run this experiment with a custom URI

[~/test] open http://localhost:5000/render?uri=http://www.github.com/resource/lab-node-heroku-urltoimage

Disclaimer

This repository like all other "lab-*" repositories under the Resource GitHub account are experimental in nature. They are provided as-is and updates are sparce.

License

2013 © Resource LLC

Licensed under the MIT License

About

Converting a URL to a PNG on Heroku with PhantomJS and ExpressJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published