Skip to content

Commit

Permalink
add bjoern support with werkzeug fallback
Browse files Browse the repository at this point in the history
though I can't test this, because bjoern does not build properly on
OS X: jonashaag/bjoern#39
  • Loading branch information
posativ committed Apr 23, 2012
1 parent 5dcf8b2 commit 5ac1b5f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/klaus
Expand Up @@ -8,7 +8,10 @@ from dulwich.repo import Repo
from dulwich.errors import NotGitRepository
from klaus import make_app

from werkzeug.serving import run_simple
try:
from bjoern import run
except ImportError:
bjoern = None

if __name__ == '__main__':

Expand Down Expand Up @@ -38,4 +41,9 @@ if __name__ == '__main__':
args.remove(path)

app = make_app(args)
run_simple(options.interface, options.port, app, use_reloader=options.reloader)

if bjoern and not options.use_reloader:
run(app, options.interface, options.port)
else:
from werkzeug.serving import run_simple
run_simple(options.interface, options.port, app, use_reloader=options.reloader)

0 comments on commit 5ac1b5f

Please sign in to comment.