16

The existence of these modules suggests Node does not ship with an equivalent command:

davidchambers
  • 23,918
  • 16
  • 76
  • 105

1 Answers1

16

There is a node package to do this.

$ npm install http-server -g
$ http-server

Node isn't aggressively batteries included like python so you have to install the pieces you want explicitly.

Michael Hunter
  • 414
  • 3
  • 8
  • 2
    Note that you can use `npx` to perform a [one-off invocation of a npm-hosted module without installing it](https://github.com/npm/npx#one-off-invocation-without-local-installation): simply run `$ npx http-server` in the command line. – waldyrious Jun 25 '20 at 15:51