HTTP server that serves files from npm packages by URL pattern /package@version/path. Current stable version 4.3.0. Designed for development or mirroring npm package contents over HTTP. Supports version ranges, tagging, automatic index generation, and optional Bower bundle creation. Pre-ESM, CommonJS-only module with named exports. Last published 2019; no recent updates. Differentiates from nginx-static or serve by resolving npm registry versions dynamically.
npm install npm-http-serverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a server that serves package.json from any npm package by URL.
Consider alternatives like unpm or unpkg for similar functionality.
Use `import { createServer } from 'npm-http-server'` or `const { createServer } = require('npm-http-server')`.Set `registryURL` to your registry's URL in createServer options.
Set `bowerBundle: '/bower.zip'` in options if needed.
Use webpack or browserify instead for asset bundling.
Run `npm install npm-http-server` and ensure correct import: `import { createServer } from 'npm-http-server'`.Change `import createServer from 'npm-http-server'` to `import { createServer } from 'npm-http-server'`.Provide a valid registry URL, e.g., `registryURL: 'https://registry.npmjs.org'`.
Verify the package name and version are correct and published to the configured registry.