Skip to content

Accepted arguments

Sayan Kundu edited this page Dec 18, 2019 · 6 revisions

List of arguments accepted

  • hostname: A string denoting the hostname the server will run under (default: "localhost")
  • port: An integer denoting the port the server will run at (default: 80)
  • docs: A string denoting the path that has the website files (default: "\htdocs" in the same directory as script)
  • index: A string denoting the name of the index file (default: "index.html")
  • connections: An integer denoting the maximum simultaneous connections (default: 5)
  • logs: A string denoting the log file (default: "\logs\logs.txt" in same directory as script)
  • customExtensions: A string containing custom file extensions to display in browser, False otherwise (default: False) ( list of extensions already defined )
  • error404: A string containing the 404 Error page (default: "\htdocs\error404.html" in same directory as script)

Notes:

By default, the server will be accessible by the localhost only. In order to open it to outside traffic, use your system IP. Using 0.0.0.0 hostname will also grant access by both localhost and system IP.

Clone this wiki locally