-
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.
- Loading branch information
Showing
4 changed files
with
27 additions
and
3 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# POKRETANJE BACKENDA | ||
|
||
Prvo, na server instalirajte Python 3.11.6 | ||
|
||
Instalirajte biblioteke potrebne za rad komandom `pip install -r requirements.txt` | ||
|
||
Kada pip instalira biblioteke, komandom `uvicorn main:app --host=0.0.0.0` započnite server. | ||
|
||
Možete podesiti host IP kako god hoćete, 0.0.0.0 se koristi da bi server bio vidljiv sa drugih uređaja | ||
|
||
Ako je sve urađeno kako treba, u konzoli će se prikazati | ||
`INFO: Uvicorn running on http://0.0.0.0:8000` | ||
|
||
Web fajlovi ce se automatski servirati na tom URL-u | ||
|
||
Što se tiče aplikacije, u fajlu `lib/backend.dart`, na liniji 17 promijeniti `host` varijablu | ||
|
||
# Naš environment | ||
|
||
Mi koristimo Ubuntu 20.04 VPS koji iznajmljujemo od Globalhost-a i ima domenu xudev.io. Na njemu hostujemo ovaj kod | ||
|
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
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 @@ | ||
uvicorn==0.24.0.post1 | ||
python-socketio==5.11.0 | ||
pydantic==2.5.2 | ||
fastapi==0.104.1 |