Framework Integrations

Use NGSRV with your favorite web framework

General Setup

The basic workflow is the same for all frameworks:

1. Start your development server:

npm run dev # or your framework's command

2. Create a tunnel:

ngsrv http <port>

3. Use the public URL:

https://abc123.tnl.ngsrv.com

Next.js

React framework with server-side rendering

Quick Start:

npm run devngsrv http 3000

Setup:

  1. Start your Next.js development server
  2. Create a tunnel to port 3000
  3. Access your app via the public URL

Use Cases:

  • Use custom domains for consistent URLs in OAuth callbacks
  • Test API routes and server components with real HTTPS
  • Share preview deployments with your team instantly

React (Vite)

Fast React development with Vite

Quick Start:

npm run devngsrv http 5173

Setup:

  1. Start Vite dev server
  2. Tunnel port 5173
  3. Test your React app from any device

Use Cases:

  • Perfect for testing responsive designs on real devices
  • Share work-in-progress with designers
  • Test third-party integrations without deployment

Laravel

PHP framework for web applications

Quick Start:

php artisan servengsrv http 8000

Setup:

  1. Start Laravel development server
  2. Create tunnel to port 8000
  3. Test webhooks and payment integrations

Use Cases:

  • Test Stripe/PayPal webhooks locally
  • Share admin panels with clients for feedback
  • Debug API endpoints with real SSL certificates

Django

Python web framework

Quick Start:

python manage.py runserverngsrv http 8000

Setup:

  1. Start Django development server
  2. Expose port 8000 via NGSRV
  3. Test with real HTTPS and webhooks

Use Cases:

  • Test OAuth flows with Google/GitHub
  • Debug webhook integrations from Stripe/Twilio
  • Share staging environments without complex setup

Express.js

Minimal Node.js web framework

Quick Start:

npm startngsrv http 3000

Setup:

  1. Start your Express server
  2. Create tunnel to your port
  3. Test APIs from anywhere

Use Cases:

  • Test REST APIs with real clients
  • Debug WebSocket connections
  • Share API documentation with frontend team

Vue.js

Progressive JavaScript framework

Quick Start:

npm run servengsrv http 8080

Setup:

  1. Start Vue development server
  2. Tunnel port 8080
  3. Test on mobile devices instantly

Use Cases:

  • Test PWA features on real devices
  • Share prototypes with stakeholders
  • Debug responsive layouts across devices

Ruby on Rails

Full-stack web framework

Quick Start:

rails serverngsrv http 3000

Setup:

  1. Start Rails server
  2. Create tunnel to port 3000
  3. Test Action Cable and webhooks

Use Cases:

  • Test Action Cable WebSocket connections
  • Debug Stripe Connect integrations
  • Share admin interfaces for testing

Flask

Lightweight Python web framework

Quick Start:

flask runngsrv http 5000

Setup:

  1. Start Flask development server
  2. Expose port 5000
  3. Test APIs and webhooks

Use Cases:

  • Test ML model APIs from mobile apps
  • Debug webhook integrations
  • Share data visualization dashboards

Advanced Tips

Custom Domains

Use a custom domain for consistent URLs across development sessions:

ngsrv http 3000 --domain myapp

Your tunnel will always be available at https://myapp.tnl.ngsrv.com

Environment Variables

Set your API token once in your shell profile:

export NGSRV_API_TOKEN=your_token_here

Local Dashboard

Monitor all requests in real-time at http://localhost:4040 when your tunnel is running.