Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node equivalent of `python -m SimpleHTTPServer`?

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

  • https://www.npmjs.org/package/simplehttpserver
  • https://www.npmjs.org/package/simple-http-server
like image 896
davidchambers Avatar asked Mar 19 '14 17:03

davidchambers


People also ask

What is SimpleHTTPServer Python?

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.

How do I start Python server in Kali Linux?

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.

Is node a web server?

Node. js is an open source server environment. Node. js uses JavaScript on the server.


1 Answers

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.

like image 51
Michael Hunter Avatar answered Sep 23 '22 10:09

Michael Hunter