Setting up a local web server with Python

The best way to test your Three.js applications, or any JavaScript application for that matter, is to run it on a local web server. This way, you have the best representation of how your users will eventually see your Three.js visualization. In this chapter, we will show you three different ways in which you can run a web server locally. The three different ways to set up a local web server are:

  • One way to do this is via a Python-based approach that you can use if you've got Python installed
  • Another way is to do if you use Node.js or have already played around with Node.js, you can use the npm command to install a simple web server
  • A third option is if you don't want to use the npm command or Python, you ...

Get Three.js Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.