Hi Jayfresh I would definitely like to make the server command extensible so that additional routes can be added. I'd also like GETting, PUTting and POSTing individual tiddlers to be part of the core.
There are a couple of relevant issues and pull requests: https://github.com/Jermolene/TiddlyWiki5/pull/976 - pull request from @natecain to add configurable GET routes https://github.com/Jermolene/TiddlyWiki5/issues/1000 - discusses adding content negotiation, which is needed if we want to be able to GET raw tiddlers and rendered tiddlers on the same URI I'm interested in being compatible with express.js, both in the sense of being able to plug express-compatible routes into TiddlyWiki as well as being able to use TiddlyWiki routes in a larger express application. Best wishes Jeremy. On Thu, Nov 6, 2014 at 9:26 PM, jayfresh <[email protected]> wrote: > I've been doing a little investigation with the aim of adding a new route > to the tiddlywiki server, which you get by running the server command under > node.js: > > tiddlywiki myWikiFolder --server > > I wanted to be able to view my tiddlers as individual HTML, like so: > > http://localhost:8080/myTiddler > > Approach one, which I couldn't make work, tried to manipulate the server > object that the server command creates at startup. But this didn't work as > I don't think the server is exposed. > > Approach two was to create a new command, "tiddler-server", which inherits > from the original server command, but extends it. So the command to run the > server becomes: > > tiddlywiki myWikiFolder --tiddler-server > > It's not ideal, as it rather removes the possibility of having multiple > plugins diving in and adding different routes to the server, but it gets me > what I need for now. > > Here's a gist of a working tiddler-server command: > https://gist.github.com/jayfresh/07edb4b270ee50d84e6b > > I'd be interested to hear if anyone has a similar use case. > > > J. > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/tiddlywiki. > For more options, visit https://groups.google.com/d/optout. > -- Jeremy Ruston mailto:[email protected] -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.

