Make example serve the HTML/assets also
Closed this issue · 0 comments
kylecordes commented
In the example here, the reader is directed to open a file in their browser. This is the "old school" way of developing HTML, we all worked this way in the 1990s.
It still sort of works today, if you are on the machine where you are running the commands. But it usually not a suitable practice for real work, since some browsers (notably Chrome, the most popular browser among developers) same-origin policy blocks pretty much everything for pages loaded from file URLs.
So, rather than direct new users down this problematic path, I suggest making the example include one more bit, the bit which serves the HTML/etc, and direct the user to localhost:nnnn rather than to open the HTML file in the browser.