hx-get from separate server #2726
Replies: 1 comment
-
The default trigger is indeed on
It seems to me that your URL is incorrect. You should probably use |
Beta Was this translation helpful? Give feedback.
-
The default trigger is indeed on
It seems to me that your URL is incorrect. You should probably use |
Beta Was this translation helpful? Give feedback.
-
Hello!
I am running two servers, one for my Front-End (port:5000) and one for my Back-End (port:5001).
Now that I have installed htmx 2.0.1 in the Front-End. I am just trying to get a short html template.
from main.js (Back-End)
From index.html (Front-End)
First off, I was under the impression that this line of code will do it's job on page load, but instead it is waiting for me to click on the div. Second, it is not getting the template from backend server, but from the frontend server, so what happens is that the div get's loaded with all the code from index.html.
To summarize, how do I specify from which port I want to get something, and how come that the request here isn't being sent on page load, but instead waiting for me to click it?
Thank you very much for taking you time to help me 🙏
Just for anyone who wonders, the two servers are both working as intended.
I can open localhost:5000 and see my web page, or localhost:5001 and only see the line "Hello from the server".
Beta Was this translation helpful? Give feedback.
All reactions