twsock v0.2.0
twsock
A node application using socket.io to update browsers with Tiddler activity on TiddlyWeb/Space
Contributing
Requirements
- node
- grunt:
npm install -g grunt-cli - beanstalkd
- tsapp - if you want to run the example client.
Project Setup
Run npm install then grunt --help for a list of available project tasks.
Running the Server
The node application listens for incoming data from beanstalkd, so this should be running first. Then run:
node server/twsock.jsThis will be running on localhost, port 8081.
Running TiddlySpace
In order to try out the server side code effectively, you will want to run a local instance of TiddlySpace. This is covered elsewhere. Additional steps beyond this are:
Install the dispatcher plugin:
pip install -U tiddlywebplugins.dispatcherCopy
listener.pyfrom thedispatcherfolder to the TiddlySpace instance directory.In tiddlywebconfig.py add the following:
'use_dispatcher': True, 'beanstalk.listeners': 'listener',
In one terminal run
twanager serverand in another runtwanager dispatcher
Running the Example Client
The example client expects an instance of TiddlySpace running against localhost on port 8080. If you are not running
the server side code, you can change this to point to tiddlyspace.com by commenting out (#) the target_server line in
the client/.tsapp file.
Run the following:
grunt curl
cd client && tsapp serveThen navigate to http://localhost:8082/index.html
Packaging and Installation
Run:
grunt packageThis produces a gzipped tarball that can be installed as follows:
grunt installThis installs twsock as a global application. It will be available in the path to run as twsock.