watson.dev.server¶
-
watson.dev.server.
make_dev_server
(app, host='0.0.0.0', port=8000, noreload=False, script_dir=None, public_dir=None)[source]¶ A simple local development server utilizing the existing simple_server module, but allows for serving of static files.
Never use this in production. EVER.
Example:
def my_app(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) return [b'<h1>Hello World!</h1>'] if __name__ == '__main__': make_dev_server(my_app)
Parameters: - app – A WSGI callable
- host – The host to bind to
- port – The port
- noreload – Whether or not to automatically reload the application when source code changes.