Some of the d3js code samples may produce errors in certain browsers when you try to run static files locally.
You can run python’s simplehttpserver while browsing the samples.
- Open up a new Command Prompt window:
- WinKey+R
- Input “cmd“.
- Enter
- Via the command line, navigate into the directory that you want served. For example, if your project folder is in your c:tmp folder, you could type:
cd c:tmp - To start the HTTP server type:
python -m SimpleHTTPServer 8888 & - To stop the HTTP server from the Command Prompt use the keyboard command Ctrl+C (⌃+C)
- Switch back to your web browser and visit the following URL: http://localhost:8888/