twsock
v0.2.0
Published
Realtime tiddler updates for TiddlyWeb and TiddlySpace
Downloads
4
Readme
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.js
This 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.dispatcher
Copy
listener.py
from thedispatcher
folder to the TiddlySpace instance directory.In tiddlywebconfig.py add the following:
'use_dispatcher': True, 'beanstalk.listeners': ['listener'],
In one terminal run
twanager server
and 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 serve
Then navigate to http://localhost:8082/index.html
Packaging and Installation
Run:
grunt package
This produces a gzipped tarball that can be installed as follows:
grunt install
This installs twsock as a global application. It will be available in the path to run as twsock
.