The existence of these modules suggests Node does not ship with an equivalent command:
The SimpleHTTPServer module is a Python module that enables a developer to lay the foundation for developing a web server. However, as sysadmins, we can use the module to serve files from a directory. Usage. Python must be installed to use the SimpleHTTPServer module.
To start a web server using Python 3, use the following command. With this syntax, our web server will be running on IP address 127.0. 0.1 and port 9000 . You can change this to anything you want, or omit the options entirely to have Python be hosted on the default IP and port.
Node. js is an open source server environment. Node. js uses JavaScript on the server.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With