Live data from Hacker News

Show HN: Scar – Static websites with HTTPS, a global CDN, and custom domains

github.com

21–30 of 171 posts

Re: Show HN: Scar – Static websites with HTTPS, a global CDN, and custom domains

#21
post #6

GitHub pages [0] gives you static sites with HTTPS and a custom domain without nearly as much complexity as this if you're looking for an alternative to Netlify. [0] https://pages.github.com/

I have two sites up using GitHub Pages + Cloudflare and it's super easy and enjoyable

Re: Show HN: Scar – Static websites with HTTPS, a global CDN, and custom domains

#22

Earlier quoted context omitted.

The CDN makes the site load faster by caching the content on edge nodes close to the client. It’s not for taking load off the origin, but purely for network latency.

And by caching it you will reduce traffic to origin.

Certainly, but for static pages the traffic to the origin is not a primary concern except for really large amounts of traffic.

Re: Show HN: Scar – Static websites with HTTPS, a global CDN, and custom domains

#23
Bundling service config and launch makes the whole process easier, for sure. There's also more than one way to configure this depending on what your needs are, so it'd be cool to have a few different versions of SCAR.

I started with a setup similar to your diagram and tweaked it when I realized S3 didn't serve index.html when the URL was just the parent "directory", i.e. example.com/foo/ doesn't resolve to s3://example.com/foo/index.html. To get this working I had to write a bit of JS in a Lambda function and deploy it at the edge of my CloudFront distribution to do some URL rewriting.

Given that's the behavior most people expect, might be worth considering?

Re: Show HN: Scar – Static websites with HTTPS, a global CDN, and custom domains

#25

How much does this cost? I put in some more effort to setup my HAProxy and nginx containers on a Vultr node, but I get LetsEncrypt for free, so I'm just paying for a Vultr node (or DO droplet) and the price of the domain name: https://github.com/sumdog/bee2

My estimate is about $1.5 a month, so definitely less than a full VPS, but it depends on the traffic and how much data you store.

Re: Show HN: Scar – Static websites with HTTPS, a global CDN, and custom domains

#26
post #23

Bundling service config and launch makes the whole process easier, for sure. There's also more than one way to configure this depending on what your needs are, so it'd be cool to have a few different versions of SCAR. I started with a setup similar to your diagram and tweaked it when I realized S3 didn't serve index.html when the URL was just the parent "directory", i.e. example.com/foo/ doesn't resolve to s3://examp…

I think that behaviour should be handled with index documents in S3, without the need for lambda: https://docs.aws.amazon.com/AmazonS3/latest/dev/IndexDocumen...

Re: Show HN: Scar – Static websites with HTTPS, a global CDN, and custom domains

#27
post #2

This is cool, I'm glad somebody built this! I love netlify but I worry about vendor lock-in.

I'm usually paranoid about vendor lock in, but I can't join you on this one.

Netlify assumes a version control repository that you can pull from, run a build step, and then host static files from. The build tools are open source, the output is static and trivial to download and rehost, and the repository is git meaning one clone is all you need to port to any other service.

Where exactly is the vendor lock in?

Re: Show HN: Scar – Static websites with HTTPS, a global CDN, and custom domains

#28
I wrote a tutorial for how to do all this setup manually, if you prefer: https://www.davidbaumgold.com/tutorials/host-static-site-aws...

Sometimes it’s nice to understand how all the pieces fit together, instead of using an automated system!

Post reply on HN