Python webserver to use D3 on a Mac | Sololearn: Learn to code for FREE!

0

Python webserver to use D3 on a Mac

I want to do some visualisation in D3 but don't have a webserver to post on. I'm trying to figure out how to use Python's simple webserver to view the visualisations in Safari. Any advice welcome?

1/8/2017 4:27:36 PM

John Lord

3 Answers

New Answer

+4

You can set up a local server on Mac using this example https://discussions.apple.com/docs/DOC-3083 local servers are very convenient for development purposes.

+3

Look at Bottle, it's a lightweight library for simple web server ( not for production ): he give a good preview of what you can manage with more powerfull web server frameworks like Django :)

0

I finally just used the simple webserver using Python for D3 v4. Just needed the "python -m http.server" command and put the html and json files in the same directory. Thanks for your help!