unbreakmat
Member
Hi im running a offline webserver on my teensy 4.1 with the ethernetjack.
I have this file :
https://code.jquery.com/jquery-3.6.3.min.js
this is an online file buth my teensy doesnt have an active internet connection (so only offline possibilities, no browsing or surfing the web possible)
1. how can i place this file on my teensy local?
2. how can i let my webserver code refer to this file so that i can include it in my webserver like this:
im guessing something like
this is the code that i use for my webserver:
any help would be greatly appreciated!
I have this file :
https://code.jquery.com/jquery-3.6.3.min.js
this is an online file buth my teensy doesnt have an active internet connection (so only offline possibilities, no browsing or surfing the web possible)
1. how can i place this file on my teensy local?
2. how can i let my webserver code refer to this file so that i can include it in my webserver like this:
Code:
const char HTTP_SCRIPT[] = "<script src='https://code.jquery.com/jquery-3.6.3.min.js'></script>";
im guessing something like
Code:
const char HTTP_SCRIPT[] = "<script src='../jquery-3.6.3.min.js'></script>";
this is the code that i use for my webserver:
Code:
server.on("/", HTTP_GET, [](AsyncWebServerRequest * request) {
handleRoot(request);
});
void handleRoot(AsyncWebServerRequest *request) {
String page = HTTP_HEAD_START;
page += HTTP_SCRIPT; /*link to script!?*/
page+= HTTP_BODY
request->send(200, "text/html", page);
}