Commits

Steven Kryskalla committed 4823da3

allow hostname to be set for "blatter serve" command

  • Participants
  • Parent commits 1df8662

Comments (0)

Files changed (1)

File blatter/__init__.py

         print "Try it out with 'blatter serve' and 'blatter blat'."
     print "Done."
 
-def action_serve(port=('p', 8008), use_reloader=True, debugger=True):
+def action_serve(port=('p', 8008), hostname=('h', 'localhost'), use_reloader=True, debugger=True):
     """Start a local web server for content viewing."""
     from werkzeug import serving
 
     if os.environ.get('WERKZEUG_RUN_MAIN') != 'true':
         print "Blatter server starting for:\n\thttp://localhost:%s%s\n" % (
             port, config.url_prefix)
-    serving.run_simple('localhost', port, app, use_reloader)
+    serving.run_simple(hostname, port, app, use_reloader)
 
 def action_generate(verbose=('v', False)):
     """Process all content in the site folder and place in the output folder."""