Hi Danielo,
good to see that you are making progress, I am very interested in
seeing this working.
From I can tell, I would start with the browser only and get it to
work there, since that seems to be the core use-case of the whole
thing. Later though, I can imagine that there probably won't be
many changes needed to get it to work with nodejs, since
essentially this is how the syncing-pipeline should be:
Browser ---tiddlyweb---> NodeJS server ---PouchDB--->
PouchDB server
When you take a look at modules/startup/startup.js (this is where
the syncer is initialized), you will see that it is in fact
possible to deny a potential PouchDB adaptor to be exectued in the
browser, when the TiddlyWeb adaptor is presented (and loaded
before your adaptor).
I would not try to create a server and a client side database, as
this duplicates existing functionality (remember, the whole nodejs
saving thingy does exactly the same) and from what I understand
the localStorage in the PouchDB adaptor is only meant for
temporary storage with the end goal of syncicng to a CouchDB,
right ?
So it makes sense to limit this kind of localStorage to only one
of the TW instances involved in a nodejs-setup (which should be
the server since that is where all the changes made, come
together).
Again though, try not to worry about nodejs just yet, get it
working in the browser first.
/Andreas