Hacker News new | past | comments | ask | show | jobs | submit login
WorldWideWeb.app (iconfactory.com)
288 points by Arubis 65 days ago | hide | past | favorite | 93 comments



I believe bonjour .local domains and DNS work on Windows by default, right?

If so, that's a great way of sharing files from iOS to Windows on a local network

Edit: just downloaded and tested, it works on Debian Linux out of the box, zero conf stuff is installed by default, I guess. This is very cool. The app is stupendous in every way. Major kudos.


In the past .local didn't work on windows. Apparently it conflicted with some discovery system that they had. It also don't work on Android, apparently for the smae reason as Windows).

I have it set up on my Linux box and it is very convenient. But the lack of Android support is very annoying.


This is really cool! Nice work.

I wonder what it would take to get live-reloading into this without anything special added by the user.

I think you'd be able to add a JS snippet that listens for server pushes (you'd push when the file system changed, I guess), then reload using window.location? Not ideal though, you'd need to inject that into the page or do something weird like output everything in an iframe.

People love their live reloads though, and a lot of people who benefit from it aren't really sure how to implement it. It would be cool to have an opt-in, no-code solution.


Vite will add live reloading to HTML it serves: https://vitejs.dev/ It even goes further with some supported frameworks and will do hot module replacement which is like live reloading but doesn't reload the full page and just injects the changed components (faster more instant updates). It'll live reload CSS, images, etc. too.

If vite seems a little too complex browsersync will do nice life reloading for all HTML it serves too: https://browsersync.io/


Interesting. I wonder how difficult it would be to bundle these features to work across devices like WorldWideWeb.app. If people were okay with a fairly opinionated workflow, you could offer some cool features.

You’d run into the same issues as Create React App for more able users, but you might not encounter that as much with the type of people who would want this.

Edit: also have to say I love vite. Such awesome work being done by those devs


For folks using Windows, there is very similar project miniWeb [1], which is also a single binary, serves a directory with one click and provides dur listings.

Very useful for LAN parties or sharing over home network, when windows network discovery just wont work.

[1] https://sourceforge.net/projects/miniweb/


This is very cool.

Until web bundles are supported in all browsers, this is a great way to share/run a folder of files as a website directly from your phone.

Thank you for this.


I've been looking for this exact thing for years! I just wanted to an easy way to spin up a web server for hosting a simple HTML page on a home intranet, and didn't want to mess around with configuring Apache or something needlessly complicated.


As others users say, you can just do `python –m SimpleHTTPServer` in the folder you want to share.

Unfortunately this is going to break in macOS 12.3, but it was available for a long time.


Hmm why will this (basic Python functionality) break in 12.3?


Starting in 12.3, macOS won't ship with any version of Python anymore. You have to install it first.


Because he’s using Python 2 instead of 3. `python -m http.server 8080`


That won't work either, since macOS won't come with python 3


Are you sure? My macOS 12.4 has a /usr/bin/python3 that is happy to accept "-m -m http.server 8080"


That's from the Xcode developer tools, not macOS itself. When you try to run that command after a fresh macOS installation, it tells you to install the Xcode dev tools.


Wow that sucks if true. Python is such a great introduction to programming and is a great tool to have installed by default on Linux and Mac.... is there any logical reason why it's being removed?


I don't like it either, but my guess is they consider it irelevant. Their software doesn't depend on it, vast majority of their users won't use it and those who want to can easily install it themselves.

I remember times when each mac came with not just Python, but also Java and Adobe Flash Player pre-installed. Of course I'm not saying they should do that again, but there was something wonderfull about powering it on and being able to e.g. play YouTube videos right away instead of having to set everything up like on a PC.


> is there any logical reason why it's being removed?

Yes. The versions they shipped with macOS were typically outdated, and shipping them with macOS would basically mean that they only get updated with macOS, so a lot of people were/are running old and vulnerable versions of those tools, and they decided to scrap them altogether.


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


As 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

[1]: https://developer.apple.com/documentation/macos-release-note...


One more sad nail in the coffin of general-purpose computing devices.


No, you were always much better off installing Python yourself than using the system's Python, which mostly served to get in the way.


I see where the GP is coming from. The old system installations of Perl, Python, and Ruby could be thought of as the 2000s equivalent of the ROM BASIC on early microcomputers -- an easy way for anyone with access to such a computer, even a child, to start dabbling with programming. But I suppose today's equivalent is the browser dev tools, or maybe Swift Playgrounds on current Apple computers.


The difference is that the barrier to entry is so much lower now. If I were trying to help someone just starting out, I would point them at something like repl.it instead of whatever is preinstalled on their machine.

The system Python and Ruby installs on macOS at this point are more of a hindrance to newbies than a help. You have to explain the differences between versions and hope they don't have to deal with any conflicts.


  > The system Python and Ruby installs on macOS at this point are more of a hindrance to newbies than a help
true, though it wouldn't be so bad if macos had a built-in package manager instead of needing to reach for homebrew (as great as it is)


Yes, 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.


There was a ton of friction trying to use pip. Same with ruby gems. So a lot of tutorials for web development put you in a pickle quickly.


Depends on the tutorial I guess. I learned python back in 08/09 so maybe the landscape has changed but I had already written full pieces of software before I ever worried about installing 3rd party libs via pip etc


In an alternate universe they could have done something about it, the same way a debian ships with a version, and if you don’t want it you change it.

Apple is no small startup that can’t maintain an update system (could have been just part of the xcode tools), so I kinda resent them for dropping the ball completely.


Well, I'm irritated at them for exposing a system Python at all, because I need Python to actually work, the way I need it to, so my point here is: Apple can't win.


It's a single line copy, paste & enter from brew.sh.


This might be the closest to the "just install jquery" advice I can think of


That’s a Python issue with how janky their language versioning and package infrastructure is, not an issue with shipping a language.


Nah, it's just raising the barrier of entry slightly for newcomers.

For the real coffin nails, I look to the gradually-increasing difficulty of installing software that isn't signed by a developer registered with Apple. Fellow frogs, is it not warm in here?


Or if you're using Python 3.x, `python -m http.server`


Not on iOS. This is the simplest way I've seen yet to run an HTTP server on my iPhone


Now that Python 2 is well past it's support date, use

    python3 -m http.server [optional port]
instead


It'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


Yes, 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.


Is mac OSX still shipping python 2 then? Yikes.

(it's python -m http.server on python 3)


No, a recent version of Monterey finally stripped it (thankfully).


Better yet, do it in Applescript!

do shell script "python –m SimpleHTTPServer"

(No idea if this will work, there's probably some stupid restriction somewhere).


Honest 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?


You can use the Script Editor to save your Applescript or JavaScript script as a .app which can be distributed as you'd like.

https://support.apple.com/guide/script-editor/welcome/mac


If 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)


Is macOS unable to launch shell scripts using the UI?


No; 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.


Might 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


There is also the ruby version: `ruby -run -ehttpd . -p8000`


With Ruby, `ruby -run -e httpd . -p 8000`


For those of us odd ones…

php -S localhost:8000 -t webdir/

https://www.php.net/manual/en/features.commandline.webserver...


True, but python comes preinstalled on macs


No 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]


The name has changed:

  ᐅ /usr/bin/python3 --version
  Python 3.8.9


Isn't Ruby also included by default?


As mentioned in another thread: not anymore.


This would have been great for the intro class I taught on computers which included a lesson on how websites work. I used MAMP for this purpose but this looks better.

https://www.mamp.info/en/windows/


Good work, This will be a great tool for designers and non-dev's who don't know or don't like to start from command line!

Just add live push/reload, you're good to go!

Like other commenters, there are a million ways to run a web server nowadays npm, python, ruby, etc


So cool. I’d honestly love to replace my laptop with an iPad. That apple pencil is so good.


I would love this, I have an iPad Pro, unfortunately in trying the WorldWideWeb app in combination with the Runestone text editor app, I discovered that it is impossible to change a file’s extension on iOS. This is an iOS limitation. I made a home.txt file by mistake, and when I tried renaming it it became home.html.txt. I had no idea this was a thing until now and it’s really put a damper on my expectations for an iPad in its current state to become a portable dev environment.


Can you use iSH to do the standard dev stuff like rename files on the host system? I think vim even works in it, so there’s a text editor too!


Hasn't that name been used before?


For the first Web Browser (and combined editor) by Tim Barnes-Lee, yes


Very nice.

On iOS can this listen on IPv6? Some cell providers allow incoming connections on IPv6.

This coupled with a dynamic DNS service could make for a cheap, always-on and portable server. Maybe put Cloudflare in front of it for IPv4 access and use their cache to smooth out TTL expiration between IP changes.


You can't keep an iOS app always listening though.


It’d be interesting to create a proxy service of some sort that woke up the app using push notifications before forwarding the actual connection.


Would the OS keep it loaded if it also played sound?


Probably, but it wouldn't pass App Store review.


Awesome, I can't wait to try it (if it works on Linux)! Previously I used `npx http-server` for this, but I'd rather use something dependency free.


Try miniserve.


+1 for miniserve. If you already have the Rust tooling set up, it's only a cargo install away. If not, you can just download a static binary.

https://github.com/svenstaro/miniserve/releases


I always run into this issue in one form or another. Glad to see a free, complete, and trustworthy solution to it.


Love the simplicity of this. Maybe a future release it can do https like npm https-localhost does


Reminds me of Xitami on Windows 95 ... I wonder if that project is still around


Nice, but there are so many development web servers already?


Try valet up and running with a few quick commands.


Shame they didn't feel like back-deploying to macOS 10.15 or earlier. I can't imagine it's doing much that would require recent APIs.


This is awesome. Thank you


From the title I'd assumed this was referring to the original web browser (https://en.wikipedia.org/wiki/WorldWideWeb), which of course would have been `WorldWideWeb.app` as well.


If the purpose is to test static html pages only, what's the problem with just opening them up in the browser with file:// paths? For everyone else who need PHP, python, ruby or node they can just use Homebrew to install the relevant packages. The only benefit I see is just sharing a URL with someone else on the same network.


I’ve run into a couple security limitations when I try to use file:// URLs


In addition to the other comments people have made, relative URLs that start with a slash don't work the way you probably intend them to if you're browsing around with file:// paths. For example, a webpage located at /Users/example/Sites/example.com/index.html when loaded with file:// URLs will not find /Users/example/Sites/example.com/style.css if you use <link rel="stylesheet" href="/style.css">. (But you probably want to use "/style.css" rather than "./style.css" because then you don't have to keep track of arbitrary depths of ../ being added for files like /Users/example/Sites/example.com/foo/bar/baz/index.html.)


It’s a fine app for the mac, but the big impact is really on iOS where you won’t be randomly opening your files in Safari.

Also path interpretation is different when you’re in “file” mode and “http” mode


Origins and schemes (among other things) are important to how content is served on the web.


While from a professional IT and security perspective it makes sense not to pre-install what may be an arbitrary language in a dated version providing unnecessary extra attack surface, things are different from an educational perspective:

Installing a Web server AND a database AND a programming language may well be too much for the impatient & low-attention span generation before trying out a 4-line "hello, world!" Web page, so some folks may never try to get into programming (which today is typically Web dev), full stop.

(Putting on old grumpy man voice) These kids today couldn't enter 15 pages of machine code in hex from game magazines as we once did. (end ranting voice)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: