Changes

Jump to navigation Jump to search
872 bytes added ,  09:56, 29 May 2014
adds kill script
Once node (and npm) is available, you of course need to get the parsoid and visual_editor extensions. A quick <code>npm install</code> in the parsoid directory sets up all the node machinery.
To have it run continuously, you might want to use the 'forever' module, but that is just a node way of monitoring processes. You might want to simply use tools build for the purpose like [[monit]]:
<source lang="bash">
npm install -g forever
</source>
But that is just a node way of monitoring processes. You might want to simply use tools built for the purpose like [[tmux]] or [[screen]] plus [[monit]]. If using <code>forever</code>, then you just prefix your call to node with 'forever'
 
At this point you're ready to run the node server. Note: while installing this, I found a bug which prevented the server from listening on the configured port. It was awesomely cool that I mentioned the bug in IRC #mediawiki-parsoid and it was fixed before I was done testing my installation!!
 
<source lang="bash">
cd ~/webapps/wiki/extensions/Parsoid/
forever node api/server.js --num-workers=2 &</source> The console should print out a list of worker pids, and the port number that the server is listening on. In your web browser, if you visit that path and port (setup in your WebFaction node mapping), you should see the Parsoid web service API message. There is no stop script for a shared host, but you should be able to do something like <source lang="bash">for pid in $(/sbin/pidof `which node`); do kill -9 $pid; done
</source>
 
==== Info ====
4,558

edits

Navigation menu