Home / This developer's life / starting on instaprev, 9/6/2021 edit
Try Documentalist, my app that offers fast, offline access to 190+ programmer API docs.

Yesterday I wrote a program than generated static HTML files. A mini website, if you will.
My options for previewing those files in the browser are not satisfactory so I had the idea of writing a service for previewing html files.
You can think of it as Netlify / Vercel but it's not for long term hosting but just previewing i.e. temporary hosting.
It's inspired by https://transfer.sh/
You don't have to sign up, you don't have to pay, you don't even need any tools. You upload a file with POST api using curl or wget and it's hosted for 2-3 hrs. Then it gets deleted.
It's hosted under a randomly generated prefix, like /p/oHF4YM/
If you have more than one file, you can pack them into a .zip file and upload that.
The big idea:
  • remove friction
  • make it fast
Less friction is how it's different from Vercel / Netlify / render.com / Cloudflare pages / Digitial Ocean Apps (and many others).
I'm also hoping to make it really fast. I've used almost all the above services and frankly I'm not impressed with how not fast they are.
Technology:
  • Go for the backend
  • deployed with Digital Ocean Apps (or some similar cheap service)
How it works:
  • a very simple Go program
  • keeps the files in memory
  • the files are removed every 2 hours
  • handles POST to /api/upload
    • generates a random prefix for serving
    • remembers the mapping between the prefix and the files
    • returns to the client the URL for preview
  • handles GET for /p/${prefix}/ and returns the files
Possible future
When you start a project you never know if it'll be useful for anyone.
But if it is, I can imagine expanding it to cover more cases:
  • handle more types of files (markdown, PDF, images (PNG, JPEG)
  • paid long-term hosting. still not a Vercel / Netlify but for $10 (one time) allow hosting under a stable url
  • optimize upload of large number of files by allowing to "append" to a given URL. This is to improve latency for the case where you generate lots of files and you can start uploading files as you generate them (as opposed to waiting until you finish generating all of them)

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:

Need fast, offline access to 190+ programmer API docs? Try my app Documentalist for Windows