Commit 29b4de1d authored by Samuel GAIST's avatar Samuel GAIST

Merge branch 'port-config' into 'master'

server-side port config

Closes #188

See merge request !41
parents 16df11ec bb74d3a9
Pipeline #26154 passed with stages
in 70 minutes and 18 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