mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-28 19:16:16 +00:00
Follow DeepSource reccommendations
Nolonger binding to the address, by default it is always localhost
This commit is contained in:
parent
6f759bb678
commit
36a7f83db6
7 changed files with 15 additions and 22 deletions
15
run.py
15
run.py
|
@ -24,19 +24,14 @@ Configuration()
|
|||
|
||||
if DEBUG:
|
||||
from gallery import create_app
|
||||
|
||||
# If no address is specified, use localhost
|
||||
if not ADDRESS:
|
||||
ADDRESS = 'localhost'
|
||||
|
||||
create_app().run(host=ADDRESS, port=PORT, debug=True, threaded=True)
|
||||
else:
|
||||
from setup.runner import OnlyLegs # pylint: disable=C0412
|
||||
|
||||
# If no address is specified, bind the server to all interfaces
|
||||
if not ADDRESS:
|
||||
ADDRESS = '0.0.0.0'
|
||||
|
||||
import sys
|
||||
|
||||
# Stop Gunicorn from reading the command line arguments as it causes errors
|
||||
sys.argv = [sys.argv[0]]
|
||||
|
||||
options = {
|
||||
'bind': f'{ADDRESS}:{PORT}',
|
||||
'workers': WORKERS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue