Static Connector Setup
Connect your database to PostPipe.in using the PostPipe Connector.
[!TIP] > Ready to go securely?
PostPipe's Static Connector creates an encrypted tunnel between your database and our platform. No firewall changes needed.
๐ Visual Flow: How Data Moves
โก Prerequisites
Before we blast off, ensure you have the following:
- โ Node.js 18+ installed (Download)
- ๐ Account at PostPipe.in
๐ Step 1: Create & Configure
Head over to the Static Connector Dashboard and follow these moves:
Option A: The "One-Click" Deploy (Recommended)
- Name It: Enter a cool name, e.g.,
my-production-db. - Fork It: Click the Fork Template button to copy the connector code to your GitHub.
- Deploy It: Use Vercel, Railway, or Azure to deploy your new repo.
- Config It: In your deployment's dashboard (e.g., Vercel), navigate to Environment Variables and paste your credentials.
- Install Command: Ensure your build settings use
npm installas the install command (Vercel usually detects this automatically).
๐๏ธ Database Setup
Depending on your database, set these variables in your environment:
MongoDB
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/dbname
PostgreSQL / Supabase / Neon
POSTGRES_URL=postgres://user:pass@host:5432/dbname(orDATABASE_URL)
๐ ๏ธ Advanced Configuration
๐ Multi-Database Routing
You can connect multiple databases to a single connector.
- In the Form Builder, add a Target Database ID (e.g.,
marketing). - Add a corresponding environment variable:
MONGODB_URI_MARKETING(all uppercase suffix). - The connector will automatically route submissions to the correct DB.
๐ง Smart Resolution
PostPipe 2.0 automatically resolves the database type per-form. If you name your target database something like production-pg or neon-db, the connector will intelligently use the PostgreSQL adapter even if your default DB_TYPE is set to mongodb.
๐ Env Var Prefixing
If you have conflicting variable names in your hosting provider, set POSTPIPE_VAR_PREFIX=MYAPP. The connector will then look for MYAPP_POSTPIPE_CONNECTOR_ID, etc.
๐ก Local Data Fetching (Bypassing SaaS)
Your connector acts as its own API. You can fetch submissions directly from your own infrastructure:
Endpoint: GET /api/postpipe/forms/:formId/submissions
Query Params:
limit: Number of records (default 50)dbType:mongodborpostgres(optional)
Example:
curl http://your-connector.vercel.app/api/postpipe/forms/form_123/submissions?limit=10
๐ Step 2: Create a Form
- Log in to PostPipe Dashboard.
- Navigate to Forms โ New Form.
- Fill in the details and hit Save.
๐งช Step 3: Test the Flow
- Copy the HTML/React code snippet provided by your new Form.
- Paste it into your local project.
- Submit test data and watch it appear in your DB!
[!IMPORTANT] > Check Your Firewall!
Ensure your database allows incoming connections from your deployed connector's IP or whitelist0.0.0.0/0for testing.