Surge – Static Web Publishing for Front-End Developers
surge.sh
surge.sh
Surge is what I've always wanted to when I do frontend development for fun and learning. This is especially true if you're new. When you're new, you don't want to set up a server to push to Heroku or Digital Ocean, you may not want to use GitHub pages, or other alternatives (not aware of all, just the ones I mentioned). You may still be new to git and git-based deployments.
Surge is simple: `surge -p build` will upload the `build` directory and give you a nice HTTPS URL to share with your friends. `surge` does the same with the current directory. You can pick a URL under their domain or use one you own. It all takes a few seconds. Perfect for portfolios, demos, etc.
If you use npm you can `npm install --save-dev surge` and add a script that does your production build step and then calls surge to deploy it.
Very underrated service!
Anyway, keep up the good work.
My set up is not dissimilar to your own. I'm comfortable working on the command line, using s3cmd to sync the site, modifying bucket policies, etc. Once you know those things - or if you enjoy learning them - it's all pretty trivial, but if you don't... well don't underestimate the hassle for someone who doesn't know this stuff. I'd think it a waste to pay $13/mo for what I'm happy to throw in an S3 bucket, but that's 3 venti lattes for someone not to have to deal with any of it. It's not the file storage they're charging for.
In the end they are just tools, and you should use whatever fits you better.
I prefer a volume based pricing model like 5apps is offering it: https://5apps.com/deploy/plans
We are still figuring out our pricing. It kind of kills me to hear someone call surge too expensive. We worked hard to give surge a very legit free offering which is serving over 35k projects. Surge gives (currently) unlimited projects with custom domains. We charge $13/mo for that extra 1% which is custom SSL, basic auth, custom redirects.
Very open to suggestions if you have any. Would you prefer we have a small membership fee and open up all the features? What would you suggest is fair?
Yes.
Though, I feel a psychological bias for paying upwards of 10 USD for services, since there are so many of them. I feel comfortable paying 9.77 USD for Netflix (India), but 12.6 USD tier just feels expensive.
I have no objection to paying 13$/mo if surge would implement some premium redundancy features. Cloudflare already gives me the SSL I need, and 13$/mo for custom redirects isn't really worthwhile for me when I can just use hash-based history for our app.
Basically I think you guys have the pricing worked out incorrectly, at least for our use-case. Avoiding downtime is the #1 reason I would pay someone else to host something for me (because tbh I can just write an ansible script to deploy my code to nginx running on Digital Ocean if I wanted to maintain it myself).
"From now on, I think I'm going to strive to build all my apps as fully static sites."
What? I can understand the idea of not overcomplicating an app when you don't need to, but how does this goal make sense for anyone who wants to build anything non-trivial?
I agree it's a hyperbolic claim but it can work depending on the domain.
This is the whole point of JavaScript frameworks to me. And definitely not trivial stuff.
What does it matter if your front endpoint is on S3 or being served by your own web server? Delivering static assets isn't that hard and you don't solve a lot by hosting the front end point of your app on S3.
Your bottleneck is way more likely to be your API long before static asset serving is a problem.
HTML, CSS, JS, and media are all static assets but you're welcome to request whatever datatypes you want behind the scenes via AJAX and/or CORs.
The benefits are entirely in the rendering speeds of an optimized web server and cache layer. Also, this approach plays extremely nicely with CDNs.
Difficulties can arise if you have to begin dealing with versioning of your assets to avoid cache invalidation, but that's what a proper build process can add to the static site.
[1] http://stout.is
With Surge, I'd have to trust some startup's build tool not to fail at a vital time.
We are having growing pains no question. We have learned lots about our system recently due to some of these incidences. Changes are underway to make the system more fault tolerant and resilient to attacks.
Give us time to make things better and please keep us on your radar.
I wish they had some minimal features that you'd need a server for. I'd pay $5-10/mo to get some basic authentication, custom headers, and maybe even some sort of user-specific key-value store.
Maybe there's a way to have a GitHub webhook automatically trigger a deploy to Surge? That would probably solve this issue for me. Though GitHub Pages is still easier.
Hope that helps.
I have been using a Firebase Hosting [1] (provides free https, CDN, CLI publish with `firebase serve`) for a while. Obviously, Firebase quotas and pricing is way another but I am curious how do you compare Surge to Firebase Hosting?
Surge is a simple tool with a really awesome CLI for deploying static sites quickly.
At netlify we're building a larger platform for working with a modern static approach.
We have an integrated continuous deployment platform. That way you just link a git repository to netlify, and we'll do the build whenever you push to git and even give you preview deploys of pull requests.
We run our own content delivery network, which means a lot for performance, and can post-process assets to automatically serve them out of a larger asset CDN with far future expires headers.
Netlify has built in Let's Encrypt support with a 1 click setup. We'll do automatic certificate rotation and enable HTTP2 when HTTPS is turned on.
Our CDN can handle complex proxying and redirect rules. If part of your site need to go to a dynamic backend or if you need API proxying, a one-line rule can set this up. We can even handle gradual migrations from a dynamic to a static approach by proxying all non-static requests straight from the CDN to a dynamic origin.
Apart from that we have lots of extra features like built-in pre-rendering for single page apps, Geo IP based redirect and rewrite rules, JavaScript snippet injection for easy analytics setup, form processing, etc, etc...
Their price is TBD, but they have a cool "quick and easy revert" feature.
Hoe does Surge compare?
(Genuinely curious, not trying to imply that "this has been done before" or shouldn't exist!)
Regarding static site deployment specifically, Aerobatic (https://www.aerobatic.com/) have a similar static site publishing offering via a Bitbucket add-on, though it uses Lambda rather than Pipelines. They've got a couple of other nifty features like auto-renewing SSL certificates, too.
In the 1 year we have been available we have had 3 incidences each for different reasons.
The first was DigitalOcean taking us offline for not complying with a DMCA takedown request. This was before Digital Ocean knew who we were and they expected foul play. From this incident DO reviewed their policies on removing network access to customers and show genuine remorse for the downtime. Like I say we have been very happy with DO and would definitely recommend them.
The second downtime was due to user error on a bad deploy and the system unraveled in a sense. This was a result of several poor things that made the system more brittle than it should be. Somewhat significant architecture changes have happened as a result and more are underway.
Last, and most recently was two DDoS attacks on our floating IPs within days apart. Learning lots still about how to best protect our customers from this. System changes and mitigation plans are being put in place to protect our customers from these sorts of attacks in the future.
Just yesterday I mentioned that I was using git and my gf assumed I meant github. She (not a developer) thought that git was a product sold by github.
Wow! Thanks! It's not like I can just get it for free on any domain I like. Not even speaking about servers like Caddy that can do that automatically on launch.