use args on run.sh

This commit is contained in:
hyperbel 2023-01-30 14:59:55 +01:00
parent 225f990c59
commit 1b9381ac8f
3 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import argparse
import ArgumentParser
from argparse import ArgumentParser
from server import server
def main():
@ -27,4 +27,4 @@ def main():
parser.print_help()
if __name__ == "__main__":
exit(main())
exit(main())

2
run.sh
View File

@ -7,4 +7,4 @@ cat ./Config/party.sql | sqlite3 party.db
export FLASK_APP=main.py
sudo python3 main.py
sudo python3 main.py $@

View File

@ -14,4 +14,10 @@ pkgs.mkShell {
pkgs.tmux
pkgs.tree
];
shellHook = ''
export FLASK_APP=main.py
export FLASK_ENV=development
export FLASK_RUN_PORT=5000
'';
}