import click
from .manager import database
from .webserver.web import get_app

@click.group()
def main():
    pass

@main.command()
def update():
    """Update PyUniProt data"""
    database.update()

@main.command()
def web():
    get_app().run()



import click
from .manager import database
from .webserver.web import get_app

@click.group()
def main():
    pass

@main.command()
def update():
    """Update PyUniProt data"""
    database.update()


@main.command()
@click.option('--host', default='0.0.0.0', help='Flask host. Defaults to localhost')
@click.option('--port', type=int, help='Flask port. Defaults to 5000')
def web(host, port):
    get_app().run(host=host, port=port)

Add host and port options to web runner
Add host and port options to web runner

  import click
  from .manager import database
  from .webserver.web import get_app
  
  @click.group()
  def main():
      pass
  
  @main.command()
  def update():
      """Update PyUniProt data"""
      database.update()
  
+ 
  @main.command()
- def web():
-     get_app().run()
+ @click.option('--host', default='0.0.0.0', help='Flask host. Defaults to localhost')
+ @click.option('--port', type=int, help='Flask port. Defaults to 5000')
+ def web(host, port):
+     get_app().run(host=host, port=port)
  
- 
- 
Add host and port options to web runner
## Code Before:
import click
from .manager import database
from .webserver.web import get_app

@click.group()
def main():
    pass

@main.command()
def update():
    """Update PyUniProt data"""
    database.update()

@main.command()
def web():
    get_app().run()



## Instruction:
Add host and port options to web runner
## Code After:
import click
from .manager import database
from .webserver.web import get_app

@click.group()
def main():
    pass

@main.command()
def update():
    """Update PyUniProt data"""
    database.update()


@main.command()
@click.option('--host', default='0.0.0.0', help='Flask host. Defaults to localhost')
@click.option('--port', type=int, help='Flask port. Defaults to 5000')
def web(host, port):
    get_app().run(host=host, port=port)
