Using a Web server
Most of the examples in this book consist of a single file (not considering the external libraries loaded using the <script> tags), and you can run them by simply opening them in a browser. You don't even need a Web server. Just click on the file and view it in your browser. But this won't work in examples that load external files via Ajax. For those files, you do need a Web server.
If you are using an HTML editor, such as PHPStorm or Brackets, it automatically starts a Web server for you and serves the page to your default browser. If you have Python installed in your system (it is native in macOS and Linux, and you can install it in Windows), you can run a simple server from the directory where your files are installed. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access