A Simple PhantomJS Screenshot Server

This is a simple screenshot server running over http. You append a url (a urlencoded url) to the server and it returns a PNG image of the screenshot. It’s a simple implementation and not very scalable because of threading limits in phantomjs. But it could be modified to be much more robust and is a great starting point if you’re interested in improving.

Here are some example urls how it works.


First step is to install

Install NodeJS and PhantomJS on Ubuntu

Save the code out to a file named server.js, then you can run it with

The Code