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!

Listeners can be hosted anywhere. In this tutorial you’ve been hosting one on your your local machine. Once ready, you can deploy your listener directly on the Flatfile platform.

Deploying a listener

To deploy your listener to the Flatfile platform, simply use the CLI deploy command in place of the develop command.

npx flatfile@latest deploy typescript/index.ts

The Flatfile CLI deploys to the environment from yoru secret key in your .env file. To change the target environment either update that file, or overwrite that value by passing a different secrets key in via flags.

You’ve deployed! You should see console output that looks like this:

> npx flatfile deploy
✔ 1 environment(s) found for these credentials
✔ Code package compiled to .flatfile/build.js
✔ Code package passed validation
✔ Environment "development" selected
⠋ Deploying event listener to Flatfilencc: Version 0.36.1
ncc: Compiling file index.js into CJS
ncc: Using typescript@5.2.2 (local user-provided)
✔ Event listener deployed and running on your environment "development". us_ag_1234

Now that your listener is deployed to the Flatfile platform, the transformations, validations, and actions you’ve configured will run server-side in our secure cloud.

Continue to make changes in your Workbook to watch them run. Want to check the output logs of your deployed listener (Agent)? Check out the “Event Logs” tab.

What’s next

Now that you know how to create a Space, where you go next depends on the what you’re trying to accomplish.

A few possibilities include the following: