Skip to content
Snippets Groups Projects
Commit b8a44f1c authored by rxd's avatar rxd
Browse files

add check port to script

parent e9668462
No related branches found
No related tags found
No related merge requests found
......@@ -24,9 +24,13 @@ echo $1
case $1 in
"start")
source env/bin/activate
export FLASK_ENV=development
if pgrep -f "flask run --host 0.0.0.0 --port 8000"; then
echo "Error: index server is already running"
exit 1
fi
export FLASK_APP=MemeGenerator
flask run --host 0.0.0.0 --port 8000
echo "MemeGenerator is running on port 8000!"
;;
"stop")
pkill -f "flask run --host 0.0.0.0 --port 8000" || true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment