Home / npm packages / http-server

http-server source code

Every file of http-server@14.1.1 as published on npm: 20 files, 124 KB. Search them by exact text or regex, in milliseconds.

It uses: process.env, the fs module, http / https.

What http-server uses

APIIn http-server
eval()
runs a string as JavaScript
NoWho does
new Function()
builds a function from a string, like eval (with or without new)
NoWho does
child_process
starts other programs
NoWho does
process.env
reads environment variables
Yes: 3 files
e.g. bin/http-server
See the lines
the fs module
reads and writes files
Yes: 6 files
e.g. bin/http-server
See the lines
http / https
makes or serves HTTP requests with Node's own modules
Yes: 1 file
e.g. lib/shims/https-server-shim.js
See the lines
fetch()
makes HTTP requests
NoWho does
XMLHttpRequest
makes HTTP requests the old browser way
NoWho does
crypto
hashes, encrypts or makes random numbers
NoWho does
WebAssembly
loads WebAssembly code
NoWho does
document.cookie
reads or writes browser cookies
NoWho does
install scripts
runs a script when it's installed
NoWho does

Exact matches in the published files, so a mention in a comment counts too: open the lines to check.

Largest files

FileSize
lib/core/show-dir/icons.json62 KB
lib/core/index.js14 KB
bin/http-server9.4 KB
README.md6.6 KB
lib/core/show-dir/index.js6.0 KB
lib/http-server.js5.5 KB
lib/core/opts.js4.6 KB
doc/http-server.14.2 KB
package.json2.5 KB
lib/core/status-handlers.js2.1 KB
lib/shims/https-server-shim.js1.7 KB
LICENSE1.1 KB
lib/core/aliases.json943 B
lib/core/show-dir/sort-files.js768 B
lib/core/show-dir/size-to-string.js763 B
lib/core/show-dir/styles.js564 B
lib/core/show-dir/perms-to-string.js392 B
lib/core/defaults.json383 B
lib/core/show-dir/last-modified-to-string.js351 B
lib/core/etag.js197 B

Questions

How many files are in http-server?

Version 14.1.1 of http-server publishes 20 files of source, 124 KB in all, not counting images, fonts and source maps.

Does http-server use eval?

No: http-server doesn't call eval() anywhere in its published files.

Does http-server start other programs?

No: http-server doesn't use child_process anywhere in its published files.

Does http-server run an install script?

No: http-server has no preinstall, install or postinstall script in its package.json.

npm packages that use…

Every package we've indexed →

Search your own code like this

The same engine answers over your documents and repositories: exact text and regex, every match counted, from your code or your AI agent.

See StackGrep Engine