No activity today, make something!
tiddlyweb How do I create an instance using a different store?

20160313183158 cdent  

When twinstance is used to create a new tiddlywebwiki instance the newly created instance will default to using the default text store. If this is not desired there are two options:

  • Create the instance as normal, then migrate it to the new store with tiddlywebplugins.migrate.
  • Follow the instructions below.

The goal here is to create the instance using the right store in the first place and then update the default with the right information. The following steps will do that, using tiddlywebplugins.gitstore:

  1. Make sure you have the necessary modules already installed (in this case that's tiddlywebwiki and tiddlywebplugins.gitstore).
  2. cd into the directory into which you plan to create your instance.
  3. Create a with the following contents:

    config = {
        'server_store': ['tiddlywebplugins.gitstore',
            {'store_root': 'gitstore'}]
  4. Run twinstance <your instance name>.

  5. cd <your instance name>.
  6. An ls will confirm the existence of a gitstore directory instead of the usual store.
  7. Update config in the instance to add a server_store entry for gitstore:

        'server_store': ['tiddlywebplugins.gitstore',
            {'store_root': 'gitstore'}]
  8. Start up the server and confirm the right stuff is there.