Skip to content

Commit 5f9abbe

Browse files
authored
Merge pull request #186 from GREENRAT-K405/dev
Add startserver and startserver.bat scripts to start the flask server.
2 parents c708337 + 8905992 commit 5f9abbe

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

startserver

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
cd fri/server
3+
if ! command -v python3 >/dev/null 2>&1; then
4+
python main.py
5+
else
6+
python3 main.py
7+
fi
8+
9+
if [ $? -ne 0 ]; then
10+
echo ""
11+
echo "Error: Make sure modules are installed from fri/requirements.txt"
12+
echo "Run: pip install -r fri/requirements.txt"
13+
echo ""
14+
fi

startserver.bat

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cd fri\server
2+
python main.py
3+
if errorlevel 1 (
4+
echo.
5+
echo Error: Make sure modules are installed from fri/requirements.txt
6+
echo Run: pip install -r fri/requirements.txt
7+
echo.
8+
)

0 commit comments

Comments
 (0)