Live data from Hacker News

I wrote a static web page and accidentally started a community (2023)

localfirstweb.dev

31–40 of 136 posts

Re: I wrote a static web page and accidentally started a community (2023)

#31
post #6

Hey browser makers, please allow file:// URLS to actually be able to load other files in the same directory without giving a CORS error. You can't even run a JS file from the same directory! That's what's really killing "local first".

You can totally load a JS file from the same directory, I do it all the time. I recall you can't use web workers, but just loading a JS file with tags is fine.

You can run non-module scripts, yes, though not modules.

Though it's easy enough to run a caddy local server. It was easier in the past, in earlier caddy versions one could just place the caddy binary in PATH and launch `caddy` from any directory to auto serve a local server, now it requires more arguments or a config file.

Re: I wrote a static web page and accidentally started a community (2023)

#32
I love the localfirst idea but I don't love web browsers. They're the platform everyone has to have but shoehorning 40 years of UI development and products into them seems like a mistake.

I can see why local UI development fell out of favor, but it is still better (faster, established tooling, computers already have it so you don't have to download it). I can't help but feel like a lighter weight VM (versus electron) is what we actually want. Or at least what _I_ want, something like UXN but just a little more fully featured.

I'm writing some personal stuff for DOS now with the idea that every platform has an established DOS emulator and the development environment is decent. Don't get me wrong this is probably totally crazy and a dead end but it's fun for now. But a universally available emulator of a bare bones simple machine could solve many computing problems at once so the idea is tempting. To use DOS as that emulator is maybe crazy but it's widely available and self-hosting. But to make networked applications advancing the state of emulators like DOSBox would be critical.

Actually local first, maybe the way forward is first to take a step back. What were we trying to accomplish again? What are computers for?

Re: I wrote a static web page and accidentally started a community (2023)

#34

Earlier quoted context omitted.

That and, bring back the "new tab" custom URL, and, a way to securely host local servers without root but also without just praying that another app doesn't port-squat me

You can bind to port 0 and have the OS then pick an available port for you.

I don't understand the downvote.

OP said

> a way to securely host local servers without root but also without just praying that another app doesn't port-squat me

Binding to port 0 is a solution. I tested it and I always get a port not used by other programs.

Re: I wrote a static web page and accidentally started a community (2023)

#35

I never made anything fancy, but I never made anything for the web that I can't run locally. If I can't just sync the changed files to the web server and overwrite the DB (which for my use cases takes seconds), I'm not interested. If it needs to be in the domain root, I'm not interested. A bunch of files using relative paths and a config that checks for running on localhost and points to the local DB or the productio…

Nah I feel like this is the right approach. Apps got too complicated to maintain safely. Web development should be accessible and have good standards. It should be easier to build webapps over the years but its becoming harder and harder.

Re: I wrote a static web page and accidentally started a community (2023)

#36
post #6

Hey browser makers, please allow file:// URLS to actually be able to load other files in the same directory without giving a CORS error. You can't even run a JS file from the same directory! That's what's really killing "local first".

Because of various security issues, what you really want is something like this web standard going forward: https://developer.chrome.com/docs/web-platform/web-bundles

and combine that with the js file APIs for working with data files.

Re: I wrote a static web page and accidentally started a community (2023)

#37
This ties in nicely with the bookmarking discussion about Pinboard. I particularly like the following quote from this article:

> Now, of course, there are many advantages to this shift: collaboration, backups, multi-device access, and so on. But it’s a trade! In exchange, we’ve lost the ability to work offline, user experience and performance, and indeed true dominion over our own data.

I’ve decided that the advantages of storing my bookmarks locally far outweigh the chance that I'll want to access them from a different device or collaborate with someone else on them. Yes, it means I've created something of a 'silo', but I'm starting to think that's not a bad thing.

Re: I wrote a static web page and accidentally started a community (2023)

#38

I love the localfirst idea but I don't love web browsers. They're the platform everyone has to have but shoehorning 40 years of UI development and products into them seems like a mistake. I can see why local UI development fell out of favor, but it is still better (faster, established tooling, computers already have it so you don't have to download it). I can't help but feel like a lighter weight VM (versus electron)…

Love this.

What are computers for?

Local first could be the file format that allows us to use devices without cloud services. Back to file first, vendors of software apps, pay for software once (or one year of updates or whatever).

It's s new horizon.

Re: I wrote a static web page and accidentally started a community (2023)

#39
post #6

Hey browser makers, please allow file:// URLS to actually be able to load other files in the same directory without giving a CORS error. You can't even run a JS file from the same directory! That's what's really killing "local first".

That and, bring back the "new tab" custom URL, and, a way to securely host local servers without root but also without just praying that another app doesn't port-squat me

I use an extension for the former and the latter has never been a problem for me using ports > 8000.

+1 for having your own local 'tab home page'!

Re: I wrote a static web page and accidentally started a community (2023)

#40

Earlier quoted context omitted.

You can bind to port 0 and have the OS then pick an available port for you.

I don't understand the downvote. OP said > a way to securely host local servers without root but also without just praying that another app doesn't port-squat me Binding to port 0 is a solution. I tested it and I always get a port not used by other programs.

I guess the main disadvantage is you can't reliably link to anything. Maybe not a problem if you only ever need one local server.
Post reply on HN