-
• #2
This is ESP8266?
You should be able to use both client and server-side code.
You can serve up other files using the server, for instance you can use this: http://www.espruino.com/File+Converter
To convert them to a string, and can then include the string. However you'll find jQuery is far too big for you to do that with.
If you were using an official Espruino board there's a filesystem library built-in so you could wire up an SD card and then serve files off that too.
However for a non-internet-connected ESP8266 I'd strongly urge you to stay away from jQuery. You can do pretty much everything you need using normal JavaScript calls like
document.querySelector
now - web browsers have moved on a long way from where they were 10 years ago, and normal JavaScript DOM calls will 'just work' on all browsers - no need for jQuery at all. -
• #3
Argg. ok. I'm using nodemcu based on esp8266 for now. I have a lot of difficulties to post JSON data over xmlhttrequest. it seems that the application/json header is not interpreted by the http module.
Thanks I will try to find another way to post my datas.
Hi, forgive me for my bad english.
1st question: is it possible to import in html page an external lib like jquery ? My esp is not connected to internet so I can't load it from an url.
2nd question: I have found this doc from official espruino documentation (https://www.espruino.com/Internet)
Can I use this code in html client side or it's just for the server side ?
Thanks in advance for your helps.