1_general_forum/server.py

9 lines
251 B
Python

# server.py
from whitenoise import WhiteNoise
def not_found(environ, start_response):
start_response('404 NOT FOUND', [('Content-Type', 'text/plain')])
return [b'Not Found']
application = WhiteNoise(not_found, root='site/', index_file=True)