Parsoid/JS/Setup

Get the code
If you want to do an anonymous checkout: git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Parsoid.git

Or if you plan to hack Parsoid, then please follow the Gerrit 'getting started' docs and use an authenticated checkout url instead, such as

git clone ssh://USERNAME@gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid.git

First, you need to install node 0.8 or 0.10. On Debian and Ubuntu: For other systems, see http://nodejs.org/download/.

Next, install the JS dependencies:

Configuration
If you would like to point the Parsoid web service to your own wiki, go to the  directory and create a   file based on. Use  to point to the MediaWiki instance(s) you want to use. Currently only public wikis are supported.

Run the server
You should be able to run the Parsoid web service using:

cd Parsoid/js node api/server.js

This will start the Parsoid HTTP service on port 8000. To test it, point your browser to http://localhost:8000/. If you configured the 'localhost' prefix correctly, you should be able to parse pages via http://localhost:8000/localhost/.

Starting the Parsoid service automatically
There are many ways to start services automatically, consult your server's operating system documentation.

On Ubuntu and other operating systems using Upstart, one approach is where /etc/init/parsoid.conf contains configuration similar to MediaWiki-Vagrant's : You may also need to install D-Bus.

On recent versions of Fedora and other operating systems using systemd, use a parsoid.service unit file similar to the following template (modify the file paths as appropriate): The optional  directive above can specify the path to a file similar to the following template:

See bug 53723 for packaging plans that should make the general installation easier.