Static pages are a popular way of getting fast, lightweight content up with haste. We're pleased to announce that Surge.sh will be joining GitHub Pages and Netlify among our growing library of static page backends. Within this article, we're going to introduce Surge, share what makes them great, then see how Fly can make their offering even better.
Ride the Walrus
Boasting over 18,000 projects, Surge has charmed thousands of developers with its reliability and simplicity. Let's run through a demo -- we'll be quick! Let's say you want a new hosted project...
npm install -g surge echo "# Surge!" > index.md surge --build
Surge will build the project, then host it as a subdomain:
coolapp.surge.sh. If you want to host your pages on your own domain, you can do that, too. To do so, you must create a
CNAME record for
www pointing to:
na-west1.surge.sh. Next, you run the following command:
surge path/to/dir coolapp.com
If you're looking for a more robust deployment, with things like HTTPS, password protection or custom redirects, you can purchase Surge Plus for $13/mo.
Fly Am the Walrus
Fly is an Application Delivery Network. We accelerate and simplify the delivery of robust, dynamic applications and light-weight static pages. When you connect a Surge back-end to Fly, your deployments are served through a global network of intelligent edge-server proxies through HTTPS and HTTP/2. You can cache assets and terminate SSL at the edge, creating significant speed improvements for first time and repeated visitors.
With a free plan on Surge, you receive a deployment on a
coolapp.surge.sh. Luckily, that's all you need to bring your Surge back-end to our global network and receive automatically renewing Let's Encrypt HTTPS on your custom domain:
Add backend, Fly will generate a preview domain. Take this preview domain to your DNS provider, then create a
A record. If you're using Surge as the front-page for your application, you can add any other back-end type like Docker, Kubernetes, or Heroku, then use routing rules to route your visitors wherever you'd like.
The cherry on-top is the library of Fly Middleware. Our Middleware are features that inject at the edge. For example, by applying Google Analytics at the server instead of the client, it becomes unblockable by client-side browser extensions like Ghostery and Disconnect.me. Other honourable mentions include: Render Speed Tracking, Geo IP headers, Google Auth -- are your users visiting from a foreign country? Do you have a localized version of your page to serve them? Do you want to gate off a static page so that only your Google Org may see it? We make it easy!
Surge.sh is a slick and easy way of hosting static front-ends of all sorts. With Fly, you can plug your deployments into a fast global network to receive HTTP/2, HTTPS, a library of useful Middleware, and more. It's a great match!
The best part? Fly is free for the first 2 million requests and 100GB of data every month. After that, it starts at $0.0035 per thousand requests, and $0.18/GB of bandwidth.
Make Your Applications Fly
Faster apps, simpler tools, happier visitors.Free Signup