Deploy previews are powerful — reviewers can see a feature running live instead of reading code diffs. But setting up preview environments with CI/CD is complex and expensive. Tunels offers a simpler approach.

The Traditional Approach

Services like Vercel and Netlify popularized deploy previews for frontend apps. But for full-stack applications with backend APIs, databases, and background workers, creating a preview environment means:

  • Spinning up a new server or container
  • Provisioning a database
  • Configuring environment variables
  • Waiting for the build to complete
  • Tearing it all down after the review

For many teams, the infrastructure cost and complexity aren't worth it.

The Tunels Approach

Instead of deploying a preview environment, you can just share your local one:

  1. Check out the feature branch
  2. Start your full stack locally (server, database, etc.)
  3. Run tunels http 3000 --subdomain pr-42-login-redesign
  4. Post the URL in your pull request

Reviewers can interact with your feature in real-time. You can make changes, and they see updates instantly — no build step, no deployment wait.

Automating with Git Hooks

You can automate tunnel creation with a simple git hook or script:

#!/bin/bash
# .git/hooks/post-checkout
BRANCH=$(git rev-parse --abbrev-ref HEAD)
SLUG=$(echo "$BRANCH" | sed 's/[^a-zA-Z0-9]/-/g' | head -c 30)
tunels http 3000 --subdomain "preview-$SLUG" &
echo "Preview: https://preview-$SLUG.tunels.io"

Posting to GitHub PRs

Combine with the GitHub CLI to automatically comment the preview URL:

PR_NUMBER=$(gh pr view --json number -q .number)
gh pr comment $PR_NUMBER --body "Preview: https://preview-$SLUG.tunels.io"

When to Use This vs. Real Deploy Previews

This approach works best for small teams (under 10 developers) where one person reviews a PR at a time. For larger teams that need persistent, always-available previews, a proper CI/CD preview environment is still the right choice.

Conclusion

Not every team needs a complex deploy preview infrastructure. Sometimes the simplest solution — running locally and sharing a tunnel — is the most effective.