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?

8th Jan 2017, 4:27 PM
John Lord
John Lord - avatar
3 ответов
+ 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.
8th Jan 2017, 4:38 PM
Alex
Alex - avatar
+ 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 :)
8th Jan 2017, 4:39 PM
visph
visph - avatar
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!
14th Jan 2017, 2:00 PM
John Lord
John Lord - avatar