Happy Friday! We just released Fly version 0.38.1
. Have a look at the changelog (diff), or just install it now: npm i -g @fly/fly
. Then give us a star on GitHub – did you know developers feed on stars?
App generator
This release introduces a CLI command that you can use to get going faster. Run fly new my-spiffy-new-app
and it'll make a directory with the file layout you need to run a minimal Fly app.
Or, if you want to start with something a little more useful, use the -t
argument to specify a template application:
fly new my-app-name -t static-site
cd my-new-app-name
fly server
open http://localhost:3000
You can use any of our example apps as templates. If you're building an API, give fly new my-api -t rate-limiter
a go. If you have a Glitch app, try fly new my-glitch -t glitch-custom-hostnames
. And if you have some image processing work to do: fly new my-images -t watermark-image
.
Logging improvements
The fly logs
command now streams logs much more quickly and includes region information in the output:
If you're interested in backend infrastructure, you might be interested to know that we moved application logging from AWS CloudWatch to our own Graylog cluster. This gives us a lot of flexibility, and we can hammer on the logging cluster as much as we want.
Custom timeouts on fetch
Every Fly app uses fetch
, and it's immensely powerful. We've had a bunch of requests for more fetch
control, mostly from developers who want to do interesting things when requests take too long. So we added a simple timeout option: fetch("https://example.com", { timeout: 100 })
will error if it doesn't receive a response + headers in 100ms.
You can use this to fallback to the cache when a fetch
takes too long, or to enforce SLAs on backend services when you're assembling a more complex page.
Next week ... what do you want?
Most of these features came straight from devs using Fly, either in our community Slack group, or through GitHub issues on our repository. Tell us what you want to see and it might happen fast!