- Download the NodeJS version of TiddlyWiki from GitHub or NPM. If you use NPM, do not use the global option (-g).
- Put web.js beside tiddlywiki.js.
- Require web.js from the Express application and call it on every matching request (see below).
- For TiddlyWiki before 5.1.14-Prerelease: In
core/modules/commands/server.js
, seperate out the requestHandler function that is passed to http.createServer so it is on the SimpleServer prototype. Add the self variable to the first line of the requestHandler as shown.
SimpleServer.prototype.listen = function(port,host) {
http.createServer(this.requestHandler.bind(this)).listen(port,host);
};
SimpleServer.prototype.requestHandler = function(request,response) {