2023-03-12 12:29:29 +00:00
|
|
|
"""
|
|
|
|
Startup arguments for the OnlyLegs gallery
|
|
|
|
|
|
|
|
-p, --port: Port to run on (default: 5000)
|
2023-04-02 23:20:34 +00:00
|
|
|
-a, --address: Address to run on (default: 127.0.0.0)
|
2023-03-12 12:29:29 +00:00
|
|
|
-w, --workers: Number of workers to run (default: 4)
|
2023-04-01 18:25:14 +00:00
|
|
|
|
2023-03-12 12:29:29 +00:00
|
|
|
-d, --debug: Run as Flask app in debug mode (default: False)
|
2023-03-12 13:12:38 +00:00
|
|
|
-S, --scream: Show verbose output (default: False)
|
2023-03-12 12:29:29 +00:00
|
|
|
-h, --help: Show a help message
|
|
|
|
"""
|
|
|
|
|
|
|
|
import argparse
|
|
|
|
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser(description='Run the OnlyLegs gallery')
|
|
|
|
parser.add_argument('-p', '--port', type=int, default=5000, help='Port to run on')
|
2023-04-02 23:20:34 +00:00
|
|
|
parser.add_argument('-a', '--address', type=str, default='127.0.0.0', help='Address to run on')
|
2023-03-12 12:29:29 +00:00
|
|
|
parser.add_argument('-w', '--workers', type=int, default=4, help='Number of workers to run')
|
|
|
|
parser.add_argument('-d', '--debug', action='store_true', help='Run as Flask app in debug mode')
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
|
|
|
|
|
|
PORT = args.port
|
|
|
|
ADDRESS = args.address
|
|
|
|
WORKERS = args.workers
|
2023-03-12 15:08:49 +00:00
|
|
|
DEBUG = args.debug
|