For a production deployment, listeners can be hosted either in your cloud or directly on the Flatfile platform.Documentation Index
Fetch the complete documentation index at: https://flatfileinc-docs-update-8de3b114-e6aa-4417-a753-2ecef733a0d.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Flatfile-Hosted Agents (Recommended)
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. Flatfile offers tooling to deploy and manage Listeners securely hosted and run in the Flatfile cloud giving you a more consistent, low-latency, high-availability experience.Deploying An Agent
Once you have configured your a local configuration running, bundling and deploying your listener to the flatfile cloud can be done in a single command../index.js,./index.ts./src/index.js./src/index.ts
Dashboard Management
You can view and manage agents via the Flatfile Dashboard. The dashboard provides a simple interface for monitoring and controlling your deployed agents with the following capabilities:| Feature | Description |
|---|---|
| View Agent | Access details about your deployed agents including their latest deployment and last received event |
| View Logs | Monitor agent activity and troubleshoot issues by examining execution logs |
| Download Agent Code | Retrieve the deployed code for reference, backup, or refactoring purposes |
| Delete Agent | Remove agents that are no longer needed from your environment |
| Revert Agent | Roll back to a previous version if issues arise with newer deployments |
| Deploy Library Agents | Deploy pre-built agents from the Flatfile Agent Library |
Re-Deploying
To update the code in your listener simply make the update your desire re-deploy. Agents are versioned and you may revert to a previous version at any time via the dashboard.Multiple Agents
To deploy a second Agent without overwriting the first, specify a unique slug:If you do not specify a slug and have only one or no deployed Agents the CLI
will update your existing Agent, or create your first Agent. The slug for this
agent will be
default.Hosting on Regional Servers
Regional servers are available upon request for those needing to host their applications closer to their user base, ensuring faster access and compliance with local data regulations.URL References
| Region | URL / SPACE_URL | API URL |
|---|---|---|
| UK | platform.uk.flatfile.com | platform.uk.flatfile.com/api |
| EU | platform.eu.flatfile.com | platform.eu.flatfile.com/api |
| AU | platform.au.flatfile.com | platform.au.flatfile.com/api |
| CA | platform.ca.flatfile.com | platform.ca.flatfile.com/api |
Configuring API URL
When deploying, you can specify theFLATFILE_API_URL either in your project’s
.env file or as an environment variable.
Embedding Via Space URL
To embed Flatfile in your application, include both apiUrl and spaceUrl in your FlatfileImporter configuration to specify your regional server:Configure API Client Environment
For direct API interactions, the FlatfileClient needs the environment parameter set to your selected regional API URL:Self-Hosting
Hosting listener code in your own cloud works similarly to how we run thedevelop command in that:
- The listener process is launched
- It polls the Flatfile API for updates
- It then responds to those Events accordingly
Related Commands
- develop - Run a local listener for development
- list - List all deployed agents in your environment
- download-agent - Download an agent from your environment
- delete - Delete an agent from your environment