- python 3.7.1
- Install project dependencies
$ pip3 install -r requirements.txt
- Create .env and put your secret key in it
$ cd mysite/
$ echo SECRET_KEY={your secret} > .env
- Migrate database tables
$ python3 manage.py makemigration
$ python3 manage.py migrate
- Create super user
$ python3 manage.py createsuperuser
# follow the prompts and create the user
- Run the backend server
$ python3 manage.py runserver 0.0.0.0:8000
- Run the backend server in ssl
$ python3 manage.py runsslserver
- You can access backend by input
http://localhost:8000/hide/
in your browser
- login
POST http://localhost:8000/api/token/
data: {"username", "password"}
- view all cars
GET http://localhost:8000/rest/clients/
- reserve a car
POST http://localhost:8000/rest/clients/
data={"carID"}
- get sdp, ip, carID
GET http://localhost:8000/rest/cars/<YOUR_TOKEN>/
- send your sdp answer
POST http://localhost:8000/rest/cars/
data={"carID", "sdp", "carIP"}
- to construct a websocket connection
ws:/localhost:8000/ws/chat/