- Initialize Git Repository git init
git remote add origin https://github.com/your-username/your-repo.git 3. # Stage Files for Commit git add . 4. # Commit Changes git commit -m "Initial commit" 5. # Push Changes to Remote Repository git push -u origin master 6. # Pull Changes from Remote Repository git pull origin master 7. # check status git status
git lfs install 2. # Track Large Files with Git LFS git lfs track "path/to/large/file" 3. # Commit the .gitattributes File git add .gitattributes git commit -m "Track large files with Git LFS"
git init git add README.md git commit -m "first commit" git branch -M main git remote add origin https://github.com/PeterKarym/TradeSphere.git git push -u origin main
.\venv\Scripts\activate
deactivate
C:\Users\hp\OneDrive\Desktop\DAPP\backend2\venv
Create Migrations: python manage.py makemigrations Apply Migrations: python manage.py migrate
PS C:\Users\hp\OneDrive\Desktop\DAPP\backend2> .\venv\Scripts\activate python manage.py makemigrations (ensure connection with the database) Start the server : python manage.py runserver browser at http://127.0.0.1:8000/
.\venv\Scripts\activate Start the server : python manage.py runserver Access the admin interface : http://127.0.0.1:8000/admin/ Username: PeterKarimi Password: Pk18230161@ Email: peterkarym@gmail.com
PS C:\Users\hp\OneDrive\Desktop\DAPP\frontend2> npm start
(venv) PS C:\Users\hp\OneDrive\Desktop\DAPP\backend python websocket_client.py
Password:Karimi@254 db name: derivapp_db db username: postgres db host: localhost
Redis is a Standalone Server running on the local computer to handle communication for Django Channels.
Redis will manage the state and message passing for WebSocket connections. This means that when a WebSocket message is received(eg Signals from EA), Redis ensures that it is correctly routed and handled by the appropriate consumer.
Path: cd "C:\Program Files\Redis-7.4.2-Windows-x64-msys2" .\redis-server.exe --port 6380
: netstat -ano | findstr :6380
:taskkill /PID 256 /F
.\venv\Scripts\activate daphne -p 8080 derivapp.asgi:application
wscat -c ws://localhost:8080/ws/trading/ test with this message: {"signalType": "buy", "price": 1.6789}
netstat -an | findstr :6380
netstat -an | findstr :8080
Press Win + X and select Windows PowerShell (Admin) : & "C:\nssm\win64\nssm.exe" start Redis
monitor the status of the Redis service using NSSM or the Services GUI to ensure it remains running:
& "C:\nssm\win64\nssm.exe" status Redis
.\redis-cli -p 6380 ping
nssm stop daphne
nssm start daphne
.\venv\Scripts\activate python insert_signals.py
.\venv\Scripts\activate python manage.py shell