7 ms·
Very cool project, but it's worth mentioning that you can simply run 'python –m SimpleHTTPServer' in any directory on mac to spin up a HTTP server with that dir
by wolframhempel 4y ago
Very cool project, but it's worth mentioning that you can simply run 'python –m SimpleHTTPServer' in any directory on mac to spin up a HTTP server with that directory as root
- PStamatiou 4y agoIt's simple for us but I think the ethos around this project is not even having to open a command line. Like old Mac OS X days, just click a button to start a web server
- steve_adams_86 4y agoYes, there are loads of people out there who would love to learn HTML, CSS, maybe some basic image editing, and never have to open a command line. It isn't intuitive to people who live in the command line (why wouldn't you want such an efficient tool?), but it's like convincing someone to like a healthy food they find repulsive.
- pqdbr 4y agoWith Ruby, `ruby -run -e httpd . -p 8000`
- acomjean 4y agoFor those of us odd ones… php -S localhost:8000 -t webdir/ https://www.php.net/manual/en/features.commandline.webserver.php https://www.php.net/manual/en/features.commandline.webserver...
- wolframhempel 4y agoTrue, but python comes preinstalled on macs
- john-aj 4y agoIsn't Ruby also included by default?
- chrisseaton 4y agoNo the opposite is true - Python does not come preinstalled, but Ruby does. chrisseaton@Chriss-MacBook-Pro ~ % python --version zsh: command not found: python chrisseaton@Chriss-MacBook-Pro ~ % ruby --version ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
- kstrauser 4y agoThe name has changed: ᐅ /usr/bin/python3 --version Python 3.8.9
- deleted 4y ago[deleted]
- monocularvision 4y agoAs mentioned in another thread: not anymore.
- smcl 4y agoOr if you're using Python 3.x, `python -m http.server`
- cpmsmith 4y agoAs the second link in the article[0] points out, this app exists precisely because they're removing that, i.e. Macs don't ship with python installed anymore. [edit] More specifically, they've already stopped shipping with Python 2, and stated their intention to stop including any scripting language runtimes at all, including Python, Ruby, and Perl.[1] [0]: https://twitter.com/chockenberry/status/1511388397855645703 https://twitter.com/chockenberry/status/1511388397855645703 [1]: https://developer.apple.com/documentation/macos-release-notes/macos-catalina-10_15-release-notes#Scripting-Language-Runtimes https://developer.apple.com/documentation/macos-release-note...
- ForHackernews 4y agoOne more sad nail in the coffin of general-purpose computing devices.
- tptacek 4y agoNo, you were always much better off installing Python yourself than using the system's Python, which mostly served to get in the way.
- AlecSchueler 4y agoYes, once you were up and running and knew what you were doing and what you needed, but the default install meant there was very little friction to first time programmers dipping their toes in the water.
- deleted 4y ago[deleted]
- arjvik 4y agoNow that Python 2 is well past it's support date, use python3 -m http.server [optional port] instead
- qbasic_forever 4y agoIs mac OSX still shipping python 2 then? Yikes. (it's python -m http.server on python 3)
- Klonoar 4y agoNo, a recent version of Monterey finally stripped it (thankfully).
- tambourine_man 4y agoNot on iOS. This is the simplest way I've seen yet to run an HTTP server on my iPhone
- deleted 4y ago[deleted]
- minton 4y agoThere is also the ruby version: `ruby -run -ehttpd . -p8000`
- russellbeattie 4y agoBetter yet, do it in Applescript! do shell script "python –m SimpleHTTPServer" (No idea if this will work, there's probably some stupid restriction somewhere).
- klez 4y agoHonest question, since my days with OSX are far behind: why would I want to do this in Applescript if the only thing this does is start the python http server? In other words, what advantage does it offer over just directly running the command?
- smcl 4y agoIf I remember correctly (been a while since I played with Applescript) I think you could save a script and set up the UI so that you can launch it in the macOS UI (instead of firing up a Terminal.app and entering the command by hand)
- teddyh 4y agoIs macOS unable to launch shell scripts using the UI?
- smcl 4y agoMight be something a more current macOS user would have to answer. I just remember doing this using a little applescript menu icon on the topbar. edit: now that I think about it, I did use "bitbar" for a while which is actually a little bit more powerful still. I can't find it any more but this looks similar - https://github.com/matryer/xbar#get-started https://github.com/matryer/xbar#get-started
- rsfinn 4y agoNo; if you give a shell script the .command extension (and make it executable), then you can double-click it in the Finder to open and run it in the Terminal application.
- 4y ago