in server these are running:
- 8080 -> tracker
- 8081 -> postgres
- 8082 -> pgadmin
- 8083 -> elasticsearch
- 8084 -> kibana
- 80 -> server
- Run
npm installin theclientdirectory. - Run
npm run devin theclientdirectory to start the application. client/renderer/components/AuthGuard.tsx,client/renderer/store/useAuthStore.ts, andclient/renderer/store/useStore.tsare related to authentication. If page redirection is not happening due to authentication, change these files.client/main/config.tsandclient/renderer/constants/api.tsstore API endpoint constants. If you want to test your local changes, change the constants to point to the local server, otherwise point them to the server running on144.122.71.171.
- Run
pip install -r requirements.txtin theservicedirectory. - Run
python manage.py runserver 8000in theservicedirectory to start the server. 8000 is for the port being used.
Example search query to server in Postman:
GET http://144.122.71.171/api/search/?query=CENG382 python3 -m venv venv source venv/bin/activateYou may want to use the following command to install requirements for python packages
pip install -r requirements.txtFor quitting
deactivateMake it inside venv
python3 manage.py makemigrations
python3 manage.py migrate After ssh to peerlink server
nohup bittorrent-tracker --ws --port 8080 &python manage.py shell
>>> from peerlink_service.models import *
>>> user1 = User.objects.create_user(username="username", email="email", password="pass")
>>> group1 = Group.objects.create(name="group_name", description="group_description")
>>> Membership.objects.create(user=user1, group=group1)
>>> user1.groups.all()
<QuerySet [<Group: Developers>]>
>>> group1.members.all()
<QuerySet [<User: username email>]>
brew install postgresql