Add another recipe, improve docs

This commit is contained in:
Jeremy Ruston 2024-01-05 15:40:39 +00:00
parent 1eed61397b
commit 0799177cf4
3 changed files with 14 additions and 7 deletions

View File

@ -16,8 +16,14 @@ tiddlywiki editions/multiwikiserver --listen
Then visit the sample wikis in a browser:
* http://127.0.0.1:8080/wiki/recipe-rho
* http://127.0.0.1:8080/wiki/recipe-sigma
* http://127.0.0.1:8080/wiki/recipe-rho - bag-alpha, bag-beta
* http://127.0.0.1:8080/wiki/recipe-sigma - bag-alpha, bag-gamma
* http://127.0.0.1:8080/wiki/recipe-tau - bag-alpha
* http://127.0.0.1:8080/wiki/recipe-upsilon - bag-alpha, bag-gamma, bag-beta
Note that changes are written to the topmost bag in a recipe.
Note that until syncing is improved it is necessary to use "Get latest changes from the server" to speed up propogation of changes.
To run the tests:

View File

@ -49,11 +49,11 @@ exports.startup = function() {
$tw.sqlTiddlerStore.createRecipe("recipe-rho",["bag-alpha","bag-beta"]);
$tw.sqlTiddlerStore.createRecipe("recipe-sigma",["bag-alpha","bag-gamma"]);
$tw.sqlTiddlerStore.createRecipe("recipe-tau",["bag-alpha"]);
$tw.sqlTiddlerStore.createRecipe("recipe-upsilon",["bag-alpha","bag-gamma","bag-beta"]);
// Save tiddlers
$tw.sqlTiddlerStore.saveTiddler({title: "Another Tiddler",text: "I'm in alpha",tags: "one two three"},"bag-alpha");
$tw.sqlTiddlerStore.saveTiddler({title: "Hello There",text: "I'm in alpha as well",tags: "one two three"},"bag-alpha");
$tw.sqlTiddlerStore.saveTiddler({title: "Hello There",text: "I'm in beta",tags: "four five six"},"bag-beta");
$tw.sqlTiddlerStore.saveTiddler({title: "Hello There",text: "I'm in gamma",tags: "seven eight nine"},"bag-gamma");
$tw.sqlTiddlerStore.saveTiddler({title: "$:/SiteTitle",text: "Bag Alpha"},"bag-alpha");
$tw.sqlTiddlerStore.saveTiddler({title: "$:/SiteTitle",text: "Bag Beta"},"bag-beta");
$tw.sqlTiddlerStore.saveTiddler({title: "$:/SiteTitle",text: "Bag Gamma"},"bag-gamma");
};
})();

View File

@ -23,9 +23,10 @@ describe("SQL tiddler store", function() {
sqlTiddlerStore.createBag("bag-alpha");
sqlTiddlerStore.createBag("bag-beta");
sqlTiddlerStore.createBag("bag-gamma");
sqlTiddlerStore.createRecipe("recipe-rho",["bag-gamma"]);
sqlTiddlerStore.createRecipe("recipe-rho",["bag-alpha","bag-beta"]);
sqlTiddlerStore.createRecipe("recipe-sigma",["bag-alpha","bag-gamma"]);
sqlTiddlerStore.createRecipe("recipe-tau",["bag-alpha"]);
sqlTiddlerStore.createRecipe("recipe-upsilon",["bag-alpha","bag-gamma","bag-beta"]);
// Tear down
afterAll(function() {
// Close the database