Skip to content
Permalink
Browse files

Let's use a production-worthy WSGI server

  • Loading branch information...
p3lim committed Feb 28, 2019
1 parent 5c624d6 commit 80ad183b2d7eeaa76fe32410c7ce4307513dcefa
Showing with 5 additions and 0 deletions.
  1. +1 −0 requirements.txt
  2. +4 −0 src/app.py
@@ -1,3 +1,4 @@
flask>=1.0<=2.0
dataset>=1.0<=2.0
pygments>=2.0<=3.0
waitress>=1.0<=2.0
@@ -7,6 +7,7 @@
from pygments import highlight
from pygments.lexers import guess_lexer
from pygments.formatters import HtmlFormatter
from waitress import serve

app = flask.Flask(__name__)

@@ -105,3 +106,6 @@ def error404(e):
@app.errorhandler(500)
def error500(e):
return 'Something went wrong!\n'

if __name__ == '__main__':
serve(app, port=5000)

0 comments on commit 80ad183

Please sign in to comment.
You can’t perform that action at this time.