From 776f89af69df4710fc2e4490ea69d9c55671c8b6 Mon Sep 17 00:00:00 2001 From: despiegk Date: Fri, 8 Nov 2024 19:49:56 +0300 Subject: [PATCH] ... --- README.md | 16 ++++++---------- install.sh | 17 ++++------------- start.sh | 4 +++- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 5ae1249..2c11076 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,15 @@ new version of threefold, minimalistic - - -## to debug / develop +## install ```bash hero git clone -u git@git.ourworld.tf:tfgrid/www_threefold4.git -cd ~/code/git.ourworld.tf/tfgrid/www_threefold4 -source myenv.sh -# to test an example -cd poc -python server.py +~/code/git.ourworld.tf/tfgrid/www_threefold4/install.sh ``` -## to add package to pip +## to start the server for seeing the website -add it to https://git.ourworld.tf/projectmycelium/hero_server/src/branch/main/requirements.txt +```bash +~/code/git.ourworld.tf/tfgrid/www_threefold4/start.sh +``` diff --git a/install.sh b/install.sh index 1ab2d9d..74a5e0c 100755 --- a/install.sh +++ b/install.sh @@ -4,21 +4,12 @@ BASE_DIR="$(cd "$(dirname "$0")" && pwd)" source ${BASE_DIR}/myenv.sh cd $BASE_DIR -python3 -m pip install -r "$BASE_DIR/requirements.txt" - -# pip freeze > requirements.txt - -#to make sure we have the paths towards hero in our library +python3 -m pip install -r "$BASE_DIR/requirements.txt" +pip install --upgrade pip PYTHON_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')") -echo "$BASE_DIR/lib" > "${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/herolib.pth" -#for osx -# pip3 install psycopg2-binary -# psycopg2 +# echo "$BASE_DIR/lib" > "${VENV_DIR}/lib/python${PYTHON_VERSION}/site-packages/herolib.pth" + echo "OK" - - -python3 -m pip install -r "requirements.txt" -pip install --upgrade pip diff --git a/start.sh b/start.sh index 2195feb..c05c5b8 100755 --- a/start.sh +++ b/start.sh @@ -1,9 +1,11 @@ #!/bin/bash -set -ex +set -e BASE_DIR="$(cd "$(dirname "$0")" && pwd)" cd $BASE_DIR source myenv.sh cd poc +set +ex +open http://127.0.0.1:8001 python server.py