A simple API client for Fly.io

Noah Prail
eventOne
Published in
1 min readJul 25, 2018
“Three people in the basket of a colorful hot air balloon floating against a blue sky” by Aaron Burden on Unsplash

We use Fly.io internally for providing custom domain support to our customers. As we built our product, I put together a Node.js API client for Fly. I realized that it could be easily modified and then published publicly for others to use. And that’s what I just did!

The API client is pretty simple and allows you to do some basic things such as creating, deleting, or getting app hostnames.

const Fly = require("@filiosoft/fly");const fly = new Fly("your-access-token");const hostnames = await fly.getHostnames('example-app')
// responds with an array of the hostnames
const response = await fly.postHostname('example-app', 'example.com')
// responds with a preview_hostname

We have released this simple library under the MIT license so that you can use it in your project! You can find the full documentation for the library here, Fly’s API docs here, and the source code on GitHub.

--

--

Noah Prail
eventOne

I am a young Christian, entrepreneur, developer and filmmaker who wants to glorify God in all I do.