-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add bash script to clean, install, and run easily
- Loading branch information
Showing
10 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
echo "Cleaning backend..." | ||
cd backend | ||
rm -rf venv || ( echo "Unable to delete venv folder!" && exit 1) | ||
echo "Backend cleaned" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
echo "Installing Backend..." | ||
cd backend | ||
echo "Creating an environment under ./venv folder..." | ||
python -m venv venv || (echo "Unable to create enviroment" && exit 1) | ||
source venv/bin/activate | ||
echo "Installing requirements..." | ||
pip install -r requirements_dev.txt || (echo "Unable to install requirements" && exit 1) | ||
echo "Backend installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cd backend | ||
source venv/bin/activate | ||
uvicorn main:app --reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
echo "Cleaning..." | ||
(./backend/clean.sh || ( echo "-- Unable to clean backend!" && exit 1)) & | ||
(./frontend/clean.sh || ( echo "-- Unable to clean frontend!" && exit 1)) & | ||
wait | ||
echo "Cleaned" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
echo "Cleaning frontend..." | ||
cd frontend | ||
rm -rf node_modules || (echo "Unable to delete node_modules!" && exit 1) | ||
echo "Frontend cleaned" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
echo "Installing Frontend..." | ||
cd frontend | ||
npm install || ( echo "Unable to install!" && exit 1) | ||
echo "Frontend installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
echo "Running frontend..." | ||
cd frontend | ||
npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
echo "Installing..." | ||
./backend/install.sh || (echo "Backend install failed" && exit 1) | ||
./frontend/install.sh || (echo "Frontend install failed" && exit 1) | ||
echo "Install done" | ||
echo "" | ||
echo "note: Don't forget to create your .env file in ./backend/ and a database in postgres" | ||
echo " Read ./backend/README.md for more information." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
echo "Running..." | ||
(./backend/run.sh || (echo "Backend couldn't start" && exit 1)) & | ||
(./frontend/run.sh || (echo "Frontend couldn't start" && exit 1)) & | ||
wait | ||
echo "Stopped" |