Fix and a script for serving wikis over http

Makes it easier to test on the iPad
print-window-tiddler
Jeremy Ruston 2012-03-07 17:40:37 +00:00
rodzic 00822a43ec
commit b1b893c692
2 zmienionych plików z 7 dodań i 4 usunięć

Wyświetl plik

@ -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");
});
response.end(recipe.cook(), "utf8");
}).listen(port);
}
},

6
tw5s.sh 100755
Wyświetl plik

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