Hi bimlas

> Maybe it's basically a bad way of thinking, so I am reformatting the 
> question: how can I use NPM modules in a widget?

Ah, OK, you’re asking if it is possible from the browser to invoke a function 
that is running on the server. That would be some kind of RPC mechanism, and we 
don’t have that, I’m afraid.

If you have something running in the browser that wants to talk to something on 
the server the simplest way to do it is to build on the sync mechanism: have 
the browser create a tiddler with some flags that gets synced to the server. 
The serverside code picks up the tiddler (by searching for the same flags), and 
then performs some operation, putting the results back in the same tiddler.

Alternatively, you can use websockets or serversentevents to communicate 
directly from code running in the browser to code running in the server.

Best wishes

Jeremy.

> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywikidev 
> <https://groups.google.com/group/tiddlywikidev>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywikidev/72c2fe2f-b746-4a2b-9d50-224b6e18ff4f%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/72c2fe2f-b746-4a2b-9d50-224b6e18ff4f%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/5E6F029D-436F-40AD-8D9B-92783E883D93%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to