[HN Gopher] Show HN: Instant preview for static websites
___________________________________________________________________
Show HN: Instant preview for static websites
Author : kjksf
Score : 14 points
Date : 2021-09-28 18:48 UTC (4 hours ago)
(HTM) web link (www.instantpreview.dev)
(TXT) w3m dump (www.instantpreview.dev)
| kjksf wrote:
| I've built a thing for myself and maybe it'll be useful for
| others.
|
| https://www.instantpreview.dev/ is like an instant, temporary
| Netlify or Vercel or Cloudflare Pages etc.
|
| The difference? No hassle (no account needed) but also not
| permanent. Uploaded website expires after ~2 hrs
|
| Why build it?
|
| I have several projects where I generate static website. I often
| want to preview it before deploying.
|
| Both Vercel and Netlify have cli that allows creating a preview
| but there's a lot of ceremony (need an account, need to create a
| project, need to create access token, keep the tokens secret).
|
| So I made Instant Preview where you don't need any of that. Just
| upload files either by drag&drop in the browser or from cmd-line
| with curl and I'll create a private (hosted under random url),
| temporary (expires in ~2 hrs) preview of a static website.
|
| It's not a web hosting service, just for previews. That's why
| expires in 2 hrs.
|
| Can also upload from code (do a POST to
| https://www.instantpreview.dev/upload with either form-encoded
| name/content or raw ZIP file). Will return a URL for the content.
|
| Concept inspired by transfer.sh, except for static websites and
| not files.
| velcrovan wrote:
| I'm a forty year old idiot that still just uses a web server
| running on a VPS. If I want publicly accesible preview I'll scp
| them to a temp folder on the web server. I am probably missing
| out on something by not using Netlify but I still haven't been
| able to figure out what. (Caveat, I'm the sole developer on all
| my projects; maybe that affects the calculus somehow)
| is_true wrote:
| I do the same. Need to handle traffic? Cloudflare.
| [deleted]
| sneak wrote:
| Most SSGs expect the site to be deployed to the root of a
| domain, not in a subdirectory. Unless all of your URLs are
| relative (including fonts, css, anything in js, et c) your
| approach probably won't work.
|
| Also, your sole VPS will fall over nearly instantly with any
| significant amount of traffic; the web is a _lot_ bigger in
| terms of eyeballs these days than it was when we started out.
|
| These static services aren't bound by the capacity of a single
| machine.
| velcrovan wrote:
| > Also, your sole VPS will fall over nearly instantly with
| any significant amount of traffic
|
| Wow, haha...no. Especially not with a static site. Even for a
| wordpress site, a $5 VPS can easily handle in the tens of
| millions of hits per day, and if that's not enough just add a
| CDN in front.
| eurasiantiger wrote:
| Is it protected against zip bombs and ../../ style pathname
| traversal?
___________________________________________________________________
(page generated 2021-09-28 23:01 UTC)