Earlier quoted context omitted.
That requires having an actual server though.
which is extremely easy to do. Most programming languages have a one-liner to do it.
I wrote a static web page and accidentally started a community (2023)
41–50 of 136 posts
Re: I wrote a static web page and accidentally started a community (2023)
#42Earlier quoted context omitted.
What I said. Local embedded SQLite and React is not tiny, it's huge. And slow. And native JS only is adequate for tiny first web. Clients do care about ms vs 5s load-times.
how do you say, implement full-text search in a local first manner? How about vector search? (don't even know if it's a thing yet, sounds possible these days). Imagine saving a local copy of a docs site (a sizable set of pages) and have search and stuff working perfectly
Re: I wrote a static web page and accidentally started a community (2023)
#43Earlier quoted context omitted.
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.
Re: I wrote a static web page and accidentally started a community (2023)
#44Hey 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".
python -m http.server 8080
If if you're stuck with python2 python -m SimpleHTTPServer 8080
At least this doesn't introduce the security issues you'd see with any file:// resource being able to load other file:// resourcesRe: I wrote a static web page and accidentally started a community (2023)
#45Next they'll discover native applications! Innovation!
Maybe after that they'll even discover that you can give a shit about the user's battery/power consumption and ram consumption again!
Re: I wrote a static web page and accidentally started a community (2023)
#46I 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.
CRDTs allow for conflict-free edits where raw files start falling short (calendars, TODOs, etc). I'd love to see something like Syncthing for CRDTs, so that local-first can take the next logical step forward and go cloud-free.
Re: I wrote a static web page and accidentally started a community (2023)
#47Well, it's always amusing how they discover that applications can run locally without depending on someone else's servers and maybe without pulling unverified code from 50 random repos. Next they'll discover native applications! Innovation! Maybe after that they'll even discover that you can give a shit about the user's battery/power consumption and ram consumption again!
Re: I wrote a static web page and accidentally started a community (2023)
#48Hey 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".
Luckily, starting a local HTTP server for development is more-or-less a one-liner for a long time, in most OSes (maybe even Windows might ship with Python nowadays?): python -m http.server 8080 If if you're stuck with python2 python -m SimpleHTTPServer 8080 At least this doesn't introduce the security issues you'd see with any file:// resource being able to load other file:// resources
https://docs.python.org/3/library/http.server.html#http-serv...
You should also add a `--bind 127.0.0.1` so you don't expose the site to everyone on your network.
Re: I wrote a static web page and accidentally started a community (2023)
#49Earlier quoted context omitted.
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.
Re: I wrote a static web page and accidentally started a community (2023)
#50I 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)…
It wouldn't be such a mistake if it was done well. For all the bells and whistles web UIs have, they still lack a lot of what we had on the desktop 30 years ago, like good keyboard shortcuts, support for tab in forms, good mask inputs, and so on.