Loading modules from a webserver #7276
Replies: 1 comment
-
Posted at 2019-01-14 by Ollie Modules in the right, are resolved using your computer internet connection, and loaded with your code which is sent over serial/bluetooth to espruino device. In the left, you're on the espruino board itself and modules are not loaded. Indeed you've no guarantee of internet on some boards. Similarly, I woudn't expect you could require and resolve http addressed modules at runtime as you appear to be doing. "Unexpected reserved word" I don't know about. Posted at 2019-01-14 by @MaBecker
Could be a syntax error in the module code. Posted at 2019-01-15 by @gfwilliams Just to add to this: The IDE scans your code on the right hand side for mentions of Espruino itself can't easily load modules via
Posted at 2019-01-15 by Robin Tue 2019.01.15 Slick! Add to Tips-and-Tricks? Posted at 2019-01-16 by fanThomas Thanks for this tip! This brought me to the Idea to store the modules to the flash using Storage. This would allow to load the modules later also offline. However I came over a problem with the storage module, i'll put this in another thread. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-01-14 by fanThomas
I have my own nodejs webserver and want to load my modules from this server. When I enter the following code on the right side of the Web IDE everything works hwever I get error messages like "Unexpected reserved word in http://192.168.88.117:8081/Wireless.js":
when I enter the command on the left side, the file is not found:
The same happens, when I require such a module within the module:
I do not understand this behaviour. Could somebody explain this to me?
Thanks for all,
Thomas
Beta Was this translation helpful? Give feedback.
All reactions