Commit bb74d3a9 authored by Jaden Diefenbaugh's avatar Jaden Diefenbaugh Committed by Samuel GAIST

server-side port config with "--port" option, #188

parent 16df11ec
Pipeline #26152 passed with stages
in 40 minutes and 40 seconds
......@@ -64,10 +64,13 @@ def editor(ctx):
type=click.STRING)
@click.option('--cache', '-c', help='Overrides the cache prefix. If not set, use the value from your RC file, otherwise defaults to `<prefix>/%(cache)s\'',
type=click.STRING)
@click.option('--port', help='Overrides the port that the beat.editor server will listen on. By default will listen on port 5000.',
default=5000,
type=click.INT)
@verbosity_option()
@click.pass_context
@raise_on_error
def serve(ctx, dev, debug, prefix, cache):
def serve(ctx, dev, debug, prefix, cache, port):
'''Run Flask server
To run the development server add option --dev
......@@ -127,6 +130,6 @@ def serve(ctx, dev, debug, prefix, cache):
if not dev:
import webbrowser
webbrowser.open('http://localhost:5000')
webbrowser.open('http://localhost:{}'.format(port))
return app.run(debug=debug)
return app.run(debug=debug, port=port)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment