Registry / http-networking / serve-build

serve-build

JSON →
library0.1.0jsnpmunverified

A minimal static file server for serving a build directory (e.g., after a build step) on a local port. Version 0.1.0 is the only release. No active maintenance or updates. Differentiators: zero-config, single command, no dependencies listed. It simply serves the `build/` folder on port 3000. No support for HTTPS, caching, or custom routes. Alternative to `http-server` or `serve` packages with fewer features.

npm install serve-build
INSTALL
IMPORT
SIG · SERVE-BUILD
S
serve-build
http-networkingjavascriptv0.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

serveBuild
import serveBuild from 'serve-build'
const serveBuild = require('serve-build')
ESM-only package; requires Node >= 12 or transpilation

Shows installation, script setup, and running serve-build to serve the build folder.

// Install: npm install serve-build // Add script to package.json: "start": "serve-build" // Run: npm start // Or directly in terminal: npx serve-build // Server starts on port 3000 and serves ./build directory
serve-build --version
Debug
Known issues
gotchaOnly serves files from the 'build/' subdirectory; not configurable.
fix
Ensure your build output is in ./build, or use a more flexible static server like 'serve' or 'http-server'.
affects: 0.1.0
gotchaPort is hardcoded to 3000; cannot change via environment variables or CLI flags.
fix
If port 3000 is in use, kill the process or use a different tool.
affects: 0.1.0
gotchaNo HTTPS support; HTTP only.
fix
Use a reverse proxy like nginx or a different server for HTTPS.
affects: 0.1.0
gotchaESM-only package; requires Node.js version >= 12 or a bundler/transpiler.
fix
Use 'latest' Node or convert project to ESM.
affects: 0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'serve-build'
Package not installed or global install missing.
fix
Run 'npm install serve-build --save-dev' or 'yarn add serve-build'
ERR_REQUIRE_ESM
Trying to require() an ESM-only package.
fix
Use 'import serveBuild from 'serve-build'' or switch project to ESM.
EADDRINUSE: address already in use :::3000
Port 3000 is busy by another process.
fix
Kill the process using port 3000 (e.g., 'lsof -ti:3000 | xargs kill') or use a different tool.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
serve-build — npm install serve-build · libregistry