File Server Reference
kevinbotlib.fileserver
kevinbotlib.fileserver.FileServer
Simple HTTP file server for KevinbotLib
__init__(directory='.', http_port=8000, host='172.0.0.1')
Initialize the file server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
directory
|
str
|
Directory to serve. Defaults to "." |
'.'
|
http_port
|
int
|
Port to serve on. Defaults to 8000. |
8000
|
host
|
str
|
Host to serve on. Defaults to "127.0.0.1". |
'172.0.0.1'
|
http_server_loop()
Start the WSGI file server
start(name='KevinbotLib.FileServer.Serve')
Start the HTTP server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name
|
str
|
Name of the server thread. Defaults to "KevinbotLib.FileServer.Serve". |
'KevinbotLib.FileServer.Serve'
|
stop()
Shutdown the HTTP server.