-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwsgi.py
More file actions
25 lines (22 loc) · 689 Bytes
/
Copy pathwsgi.py
File metadata and controls
25 lines (22 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""Start the application."""
import click
from nbaspa_app import create_app
@click.command()
@click.option(
"--config",
type=click.Choice(["development", "production"], case_sensitive=True),
default="development",
help="Whether to launch the application with the production configuration"
)
@click.option(
"--host", type=str, default="0.0.0.0", help="The host to launch the application on"
)
@click.option(
"--port", type=str, default="8000", help="The port to launch the application on"
)
def main(config, host, port):
"""Launch the application."""
app = create_app(config=config)
app.run(host=host, port=port)
if __name__ == "__main__":
main()