Integration guide
Everything you need to connect your codebase, CI/CD pipeline, and databases to a live Pulsar project.
1 — CLI quick start
The fastest path from clone to running locally:
npm install -g pulsar-deploy-cli # install once pulsar auth login # GitHub OAuth pulsar init # link current dir → creates pulsar.json pulsar env pull # download env vars to .env npm install && npm run dev # run locally pulsar deploy # deploy to production
2 — Connect a database
After creating a managed instance in the dashboard, get its connection string:
# List running instances pulsar db list # Get connection string + env-set hint pulsar db connection my-postgres # Add it to your project pulsar env set DATABASE_URL "postgresql://user:pass@localhost:5432/mydb" # Redeploy to apply pulsar deploy
PostgreSQL (Node.js)
import { Pool } from 'pg'; // npm install pg
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
export const query = (text, params) => pool.query(text, params);Redis (Node.js)
import Redis from 'ioredis'; // npm install ioredis
const redis = new Redis(process.env.REDIS_URL);
await redis.set('key', 'value', 'EX', 3600);MongoDB (Node.js)
import { MongoClient } from 'mongodb'; // npm install mongodb
const client = new MongoClient(process.env.MONGODB_URL);
await client.connect();
const db = client.db();PocketBase (any framework)
import PocketBase from 'pocketbase'; // npm install pocketbase
const pb = new PocketBase(process.env.POCKETBASE_URL);
const records = await pb.collection('posts').getList(1, 20);3 — Environment variables
All env vars are AES-256 encrypted at rest and injected at build time.
# Sync your whole team with one command pulsar env pull # writes .env locally # Push a local .env to Pulsar pulsar env push # Set a single var pulsar env set NODE_ENV production --env production
.env to your .gitignore — pulsar env pull will warn if it is missing.// Access in Node.js / Next.js const url = process.env.DATABASE_URL;
# Python
import os
url = os.environ.get("DATABASE_URL")4 — GitHub Actions (CI/CD)
Create a deploy hook in the project's Automations page, then store the URL as a GitHub secret named PULSAR_HOOK_URL.
Deploy after tests pass
name: Test & Deploy
on:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '20' }
- run: npm ci && npm test
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- name: Deploy to Pulsar
run: curl -sf -X POST "${{ secrets.PULSAR_HOOK_URL }}"Simple push-to-deploy workflow
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to Pulsar
run: curl -sf -X POST "${{ secrets.PULSAR_HOOK_URL }}"5 — Deploy hooks (any platform)
A deploy hook is a secret POST URL. Call it from Zapier, Make, Render, any CI, or a shell script.
# curl curl -X POST "https://api.pulsardeploy.com/api/projects/PROJECT_ID/deploy-hooks/HOOK_ID/trigger?secret=SECRET"
// JavaScript
await fetch('https://api.pulsardeploy.com/api/projects/.../trigger?secret=...', {
method: 'POST',
});# Python
import requests
requests.post('https://api.pulsardeploy.com/api/projects/.../trigger?secret=...')Find or create hooks in the project's Automations page, or use the integrated Integrate guide accessible from the project header.
6 — Slack & Discord
Get notified on deploy start, success, failure, and health alerts directly in your team channels.
Paste the webhook URL into the project's Automations → Slack/Discord fields. Events: deploy started · success · failed · health alert.