-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Open
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered staletoolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
Description
What is the problem this feature will solve?
HTTP Server is a very popular package with 1M+ weekly downloads used to expose static files from a directory.
Node.js doesn't have any native way to expose static files in a directory from a single command.
This is an idea given by @ruyadorno during a session on Tooling WG at nodejs/tooling#164 which he suggested I implement it.
What is the feature you are proposing to solve the problem?
In Python, they have the SimpleHTTPServer a native module meant for the development environment and has basic security checks.
The idea is not to replace the HTTP Server package, as it's a robust package, but to have a similar implementation to Python's SimpleHTTPServer exposing directory files.
Adding something like:
node --serve directory -p 3000or
node --serve .
#with a default portWhat alternatives have you considered?
No response
JulienLeal, DominusKelvin, ruyadorno, trivikr, khaosdoctor and 4 more
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.never-staleMark issue so that it is never considered staleMark issue so that it is never considered staletoolsIssues and PRs related to the tools directory.Issues and PRs related to the tools directory.
Type
Projects
Status
Awaiting Triage