The DevXP engineering team hosts office hours every Thursday at 11 a.m. Pacific Time where we answer your questions live and help you get up and running with Flatfile. Join us!

For a production deployment, listeners can be hosted either in your cloud or directly on the Flatfile platform.

While your own cloud provides the maximum level of control over listener code, qualities such as availability and network performance are the responsibility of the hosting provider. Listeners may be securely deployed and run in the Flatfile platform cloud giving you a more consistent, low-latency, high-availability experience.

Deploying a Workbook to Flatfile from terminal

Once you have configured your Workbook, you can deploy your Workbook to your account at any time by opening the terminal in the root directory and entering this command:

npx flatfile@latest deploy --token=YOUR_SECRET_KEY

Add the file name to the command: npx flatfile deploy path-to-file if you’re not running an index file.

The CLI will give you prompts and updates as it’s deploying:

> npx flatfile@latest deploy --token=sk_123456

✔  Code package compiled to .flatfile/build.js
✔  Code package passed validation
✔  Environment "Default" selected
✔  Event listener deployed and running on your environment "Default". us_ag_1234

See it in your Dashboard

Once your Workbook has been deployed, you’ll be able to see a new Space in your Dashboard. Your Workbook will be added to every Space you create.

You can also configure your code to build different Workbooks as a Space is created depending on various factors, but this is a more advanced configuration. More on how to do this soon.

Deploying more than once

You can deploy any change to your code at any time.

For example, if you need to add a Sheet to an already existing Workbook, simply deploy again with the added Sheet and everything will update.

Hosting in your own cloud

Hosting listener code in your own cloud works similarly to how we run the develop command in that:

  1. The listener process is launched
  2. It polls the Flatfile API for updates
  3. It then responds to those Events accordingly

Reach out to support for learning how about hosting in your own cloud.