blob: 3ea4dd339c8e57d47c6487427d63a5f0deaedc07 (
plain)
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
|
#!/usr/bin/env python3
'''
Script facade for direct execution with waitress WSGI server.
Note that szurubooru can be also run using ``python -m szurubooru``, when in
the repository's root directory.
'''
import argparse
import os.path
import sys
import waitress
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.pardir))
from szurubooru.app import create_app
def main():
parser = argparse.ArgumentParser('Starts szurubooru using waitress.')
parser.add_argument(
'-p', '--port',
type=int, help='port to listen on', default=6666)
parser.add_argument(
'--host', help='IP to listen on', default='0.0.0.0')
args = parser.parse_args()
app = create_app()
waitress.serve(app, host=args.host, port=args.port)
if __name__ == '__main__':
main()
|
© 2015 - 2026 Jakob L. Kreuze