1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Fix and a script for serving wikis over http

Makes it easier to test on the iPad
This commit is contained in:
Jeremy Ruston 2012-03-07 17:40:37 +00:00
parent 00822a43ec
commit b1b893c692
2 changed files with 7 additions and 4 deletions

View File

@ -167,10 +167,7 @@ var commandLineSwitches = {
// Dumbly, this implementation wastes the recipe processing that happened on the --recipe switch
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/html"});
var store = new WikiStore();
var recipe = new Recipe({store: store,filepath: lastRecipeFilepath},function() {
response.end(recipe.cook(), "utf8");
});
}).listen(port);
}
},

6
tw5s.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
# serve TiddlyWiki5 over HTTP
# cook TiddlyWiki5
node tiddlywiki.js --recipe $PWD/tiddlywiki5/tiddlywiki5.recipe --servewiki 8080 || exit 1