Phil,
I expect you will get help here but this ind of issue would possibly be
best posted here https://groups.google.com/forum/?hl=en#!forum/tiddlywikidev
Jeremy has implemented tiddlywiki on AWS
Regards
Tony
On Friday, November 1, 2019 at 4:27:06 AM UTC+11, Philip Wonski wrote:
>
> Hi Group-
>
> 1) I have a TW that does some frontend AJAX using simple XMLHttpRequest in
> the browser.
>
> 2) If I try to render the AJAX tiddler in Lambda, it throws the common
> node error since node requires a separate package xmlhttprequest.
>
> 3) My question is, how best to include this dependency in the Lambda. I
> tried first with npm locally, then zipping the updated package.json plus
> the node_modules folder with xmlhttprequest module included.
>
> 3b- this still throws an error as the lambda is not finding the module.
> Presumably I am violating "everything is a tiddler" and need my js inside
> the index.js.
>
> 3c- so it seems better approach is to require the module as a tiddler like
> var XMLHttpRequest = require("$:/mymodules/xmlhttprequest").XMLHttpRequest
> ;
>
>
> But I am new to creating modules in TW, so before I waste hours with trial
> and error I figured I'd make sure I'm on the right track. How should my
> original xmlhttprequest.js be modified so that it works as a tiddler like
> $:/mymodules/xmlhttprequest?
>
>
> Sincere thanks,
>
> Phil
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/67344736-f034-4ead-929d-ccf866603a34%40googlegroups.com.