Hacker News new | ask | show | jobs
by seanwilson 2628 days ago
> But you get free static sites through GitHub, nearly free static sites on Amazon S3.

I've been really happy using Netlify (with Jekyll) for https://www.checkbot.io/ - I didn't have to think about server admin at all when I got traffic spikes from Hacker News and Product Hunt traffic, and development features make working on the website really straightforward.

Features I like:

- Git based deploys automatically when you make a commit

- Git based rollbacks if there's a problem with the latest commit

- non-master Git branches are automatically deployed for preview

- automatic CDN + HTTPS setup

- no servers to admin i.e. they deal with security, scaling and configuration for you

- they do instant cache invalidation of images/CSS/JS files for you so there's no stale files being served after deploys

- before deploying you can run complex build scripts on Netlify to generate files to be deployed e.g. any static site generator you want to use, run arbitrary NPM scripts, you can download data that to be rendered on to a page

- you can use Netlify CMS as a friendly web interface to edit blog posts, articles and FAQs. It's easy enough for non-technical people so it's possible to use for standard business websites that would normally require something more complex to admin like WordPress.

You can cobble together something like the above yourself but Netlify makes it simple and robust so you can get on with more important things.

People that say you can do something similar with e.g. a Digital Ocean droplet are missing the point and are for sure paying with their time. If you've worked in web dev for a while you've probably tried to automate many of the above features yourself but it's just never going to be as robust as a service that has a dedicated support team behind it.

4 comments

Obvious to everyone except me, it seems, so obvious that it's never mentioned by anybody, is: What about databases?

The answer could be, "Well, obviously, it's not for database-backed websites", or "Obviously it's perfect for database-backed websites, because now you can use their X feature for your database", or "Obviously, you use some other company to host your database but Netlify for everything else, which is a great improvement because...", or whatever.

What am I obviously missing?

Honestly? Most internet sites don't _need_ a database. You could probably replace most* wordpress/squarespace/wix sites with a statically generated site.

You can call api's from JS and host your database separately, also possible that people use some kind of "serverless" database like google firebase.

Most internet sites don't _need_ a database.

Right, and the rest of them—a very significant portion—do. And yes, I realize that it's possible to use JS to fetch from anywhere, but what I'm wondering is what people are thinking when talking about Netlify.

Are they thinking that this isn't really for database-backed websites but can be used if some other Netlify advantage justifies putting your database and the server code that uses it in different timezones? Or is it the opposite, that this is actually a better way of managing a database-backed website?

What is the positioning of this new type of managed hosting with respect to websites that depend on databases full of, say, customer data? It seems as though that would be a FAQ, not an exotic niche.

I guess they're going after the people who don't need a db first, then add features to support some kind of "db-lite" functionality later. They're competing with wordpress/squarespace, not gcloud or aws (mostly..) :)

See addons: https://www.netlify.com/products/

Also services like this allow you to have a "cms" which is the typical use of a db for _most_ websites: https://www.contentful.com/.

You are correct, heavy db users probably wouldn't go with a service like this :)

If you're not aware, you get most of that for free with GitHub pages:

https://pages.github.com/

It deploys when you push, is based on Jekyll, and GitHub handles all of the hosting/HTTPS/caching themselves.

You're forced to use Jekyll, though, and you're forced to use Github. Netlify lets you generate your site however you want and doesn't tie you to a git provider.
You're not forced to use Jekyll. You just get some nice things if you do. As long as you have a pages repo with an index.html in the root, GitHub can serve it for you. How you generate the repo is completely up to you. I have my own custom static site generator that I use to publish my blog, I use that with a script that does some git dance to keep things clean and it just works.
If you don't use Jekyll (let's say, e.g Hugo) you have to commit the content/artefacts to be published to the repo. Committing artefacts to a repo, even if it's a dedicated branch with a separate root, always seemed like a glorious hack to me with consequences such as CI needing push access to the repo. GitLab CI+Pages doesn't need such a hack but then, competing with that would mean GitHub would basically have to allow running arbitrary process during the publish pipeline, which means they'd enter CI space.
Github pages are limited for 50k views per month.
Gitlab too does this, along with free unlimited private repos & published static sites; html n Jekyll n all. Just a happy user.
Glad to hear that you enjoy using GitLab! Here's a link if anyone wondered https://about.gitlab.com/product/pages/
Gitlab also lets you generate them with whatever you want as it just publishes a result from CI to the pages system
Great summary!

Out of the box support for prerendering is also fantastic too – https://www.netlify.com/docs/prerendering/

Just wondering does zeit also does the same ? http://zeit.co/
Zeit is more about full applications rather than mostly static sites but yes you can do the same thing with both.