Create bash script to runserver
Syntax: ./run_server.sh port ./run_server.sh 2121
This commit is contained in:
parent
245c80dcf6
commit
7c4fb1e2b5
13
run_server.sh
Normal file
13
run_server.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#! /bin/bash
|
||||
|
||||
port=$1
|
||||
|
||||
if [ -d venv ]; then
|
||||
source venv/bin/activate
|
||||
sanic server.app -H 0.0.0.0 -p $port
|
||||
else
|
||||
python3.10 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r reqs.txt
|
||||
sanic server.app -H 0.0.0.0 -p $port
|
||||
fi
|
||||
Loading…
Reference in New Issue
Block a user