How to use the tiddlywiki/boot/boot.js.TiddlyWiki function in tiddlywiki

To help you get started, we’ve selected a few tiddlywiki examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mklauber / TiddlyServer / source / js / server.js View on Github external
Server.prototype.start = function(prefix) {
  var socketPath = path.join(this.socketDir, prefix);
  var wikiPath   = path.join(this.wikiDir, prefix);
  console.log("Starting server at " + prefix + " for " + wikiPath);

  // Create the server on a unix socket path
  var $tw = require("tiddlywiki/boot/bootprefix.js").bootprefix();
  delete $tw.browser;
  var server = require("tiddlywiki/boot/boot.js").TiddlyWiki($tw);
  server.boot.argv = [wikiPath, '--unixserver', socketPath]
  server.boot.boot();

  // Save the server to the object, so we can shut it down later if needed.
  this.servers[prefix] = server;
  // Setup the proxy rules to route to the correct location.
  this.proxyRules.rules["/" + prefix] = {socketPath: socketPath};
};

tiddlywiki

a non-linear personal web notebook

BSD
Latest version published 4 days ago

Package Health Score

87 / 100
Full package analysis