pip install bjoern
python
import bjoern
def application(environ, start_response):
status = '200 OK'
headers = [('Content-type', 'text/plain')]
start_response(status, headers)
return [b'Hello, World!']
if __name__ == '__main__':
host = '127.0.0.1'
port = 8000
print(f'Server is running on http://{host}:{port}')
bjoern.run(application, host, port)
python
import bjoern
def application(environ, start_response):
if __name__ == '__main__':
host = '127.0.0.1'
port = 8000
print(f'Server is running on http://{host}:{port}')
bjoern.run(application, host, port)