Jun 03, 2011. If you are more familiar with Node.js, http-server is your choice. If you are new to Node.js, why not give it a try. Take 1 minute to go to Node.js homepage to download and install it. Install http-server using: $ npm install http-server -g Go under the folder you want to serve your files and setup your local server by running this command.
Source code:Lib/http/server.py
This module defines classes for implementing HTTP servers (Web servers).
Warning
http.server is not recommended for production. It only implementsbasic security checks.
One class,
HTTPServer , is a socketserver.TCPServer subclass.It creates and listens at the HTTP socket, dispatching the requests to ahandler. Code to create and run the server looks like this:
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |