Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialnfs
35,526 PointsThe AJAX works without a Server !!
So I was taking this course again as a refresher and I noticed something interesting, the AJAX works without the server. Maybe the behaviors of the browsers have changed? I need a better explanation. Thank you...
N.B: An npm HTTP-server was serving another folder though, is that the culprit? I think no, cuz it was in another directory. And I downloaded the project files and opened them as any other index.html file. nothing fancy.
3 Answers
Steven Parker
231,248 PointsAny running server could be contacted by any client, no matter what file folder it was started from. Perhaps you can enable logging on the server to see the requests being handled.
nfs
35,526 PointsI see... Thank you.
nfs
35,526 PointsYou're right, I tested it just now, after closing the server. Doesn't work.
Ikuyasu Usui
36 PointsIkuyasu Usui
36 PointsIt works with Liver Server plugin in VS code editor too.