-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapp.py
executable file
·40 lines (37 loc) · 865 Bytes
/
app.py
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
import argparse
from paypark import create_app
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='PayPark Web Application'
)
parser.add_argument(
'--debug',
action='store_true',
help='Enable debug mode'
)
parser.add_argument(
'--host',
type=str,
default='0.0.0.0',
help='Host address'
)
parser.add_argument(
'--port',
type=int,
default=8085,
help='Port'
)
parser.add_argument(
'--config',
choices=['production','development','testing','default'],
default='default',
help='Configuration'
)
args = parser.parse_args()
app = create_app(args.config)
app.run(
debug=args.debug,
host=args.host,
port=args.port
)