hack-house/run_server.sh
mirai 7c4fb1e2b5 Create bash script to runserver
Syntax: ./run_server.sh port
./run_server.sh 2121
2022-12-01 09:50:57 +03:00

14 lines
236 B
Bash

#! /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