Serve Node.js apps at
https://[folder].test
One simple command bridges your Node.js dev server with Laravel Herd.
nherd run dev detects the dynamic port, mounts the proxy with local SSL, and cleans up seamlessly on exit.
macOS only • Node.js >= 24 • Laravel Herd required
> vite
Key Features
Bring Node.js dev servers right into your Herd workflow
Say goodbye to memorizing changing port numbers or manually running `herd proxy`.
Dynamic Port Sniffing
When default port 5173 is already taken, Vite or Astro steps to 5174. nherd sniffs whichever port actually binds and proxies it dynamically.
Instant Local HTTPS
Leverage Laravel Herd's trusted local root Certificate Authority and secure SSL directly for your Node.js apps at https://[folder].test.
Zero-Trace Cleanup
Hit Ctrl+C and nherd executes herd unproxy before terminating all child processes without leaving orphans.
Unbroken HMR & TTY
Hot Module Replacement (HMR) and WebSockets work out-of-the-box. Terminal interactive shortcuts (like h + Enter) remain completely functional.
Subdomains & IPv6 Ready
Fully handles dotted folder names (e.g., admin.shop.test) and inspects both IPv4 (127.0.0.1) and IPv6 (::1) loopback targets.
Zero Runtime Dependencies
Crafted exclusively with Node.js 24 native APIs and standard OS tooling for near-instant boot times and bulletproof stability.
Workflow
How does nherd operate behind the scenes?
Preflight & Launch
Validates your current directory name, confirms package.json has a dev script, verifies herd is on PATH, and starts the dev server.
Sniff & Proxy
Discovers the actual listening port directly from the OS process table, then automatically calls herd proxy [folder] [target] to map the domain.
Graceful Shutdown
Upon receiving Ctrl+C, nherd executes herd unproxy and safely cleans up all child processes before exiting.
Configuration
One-time setup: add allowedHosts
Modern dev servers block requests from unknown domains for security. Add your project's .test host to your configuration once.
export default {
server: {
allowedHosts: ["my-app.test"], // Replace with your folder name
},
};
my-app, the address is my-app.test. Folders with dots (like admin.shop) map directly to admin.shop.test.
Quick Start
Up and running in 3 easy steps
Install nherd globally with npm
Makes the nherd command accessible from any terminal.
npm install -g nherd
Run nherd run dev
Simply swap npm run dev for nherd run dev in your project.
nherd run dev
Open https://[folder].test
Full HMR updates in real time. Press Ctrl+C when you're done.
Supercharge your Laravel Herd & Node.js workflow
nherd is open-source and freely available under the MIT license. Issues, ideas, and contributions are warmly welcome.