v1.1 · SPA fallback available

Serve files at native speed from one binary.

Servexy is a zero-config HTTP file server built with Go. Install once, serve any folder, ship your SPA — all from a single native binary that boots in milliseconds.

$ npm install -g servexy
zsh — servexy
# Serve your SPA build with history routing
$ servexy -d ./dist -s
servexy is running
serving directory: ./dist
spa fallback: enabled
server: http://localhost:8080
Built with Go 🐹
Everything you need

A file server that just works.

One binary. Zero config. Built for the way modern web developers actually ship.

Lightning Fast

Native Go binary. Zero JS overhead. Cold start in under 10ms.

Zero Configuration

One command serves any directory. No config files, no setup wizards.

SPA History Fallback

Pass -s and missing HTML routes serve index.html — built for Vue, React, and Svelte.

Network Access

Bind to your LAN with -n. Share files across devices instantly.

Prebuilt Binaries

Install-script free. Ships prebuilt binaries — install in milliseconds.

Cross-Platform

Windows, macOS, Linux. Native x64 and ARM64 support on every platform.

MIT licensed · Open source forever
Get started

Install your way.
Ship in seconds.

# Install globally
npm install -g servexy
# Or run without installing
npx servexy -p 8080

Common recipes

Serve current dir

servexy

Default port 8080

Custom port

servexy -p 3000

Any port from 1–65535

Specific directory

servexy -d ./public

Point at any folder

Network mode

servexy -n

Bind to 0.0.0.0 (LAN)

SPA fallback

servexy -d ./dist -s

Vue / React / Svelte history routing

Build SPA + serve

vite build && servexy -d ./dist -s

One-liner for production preview

CLI Flags

  • -p, -port Port to serve on (default: 8080)
  • -d, -dir Directory to serve (default: current)
  • -n, -network Bind on all interfaces (LAN access)
  • -s, -spa Serve index.html for missing HTML routes
  • -h, -help Show the help message