I am trying to test a Django app by using other devices in my local network. I am using Angular as my client.
So far, I am able to run my Angular app on other devices. However, whenever I try to make any sort of request, I get back a response specifying: net::ERR_CONNECTION_REFUSED
I am able to properly run both the client app and Django REST server in my local machine but it's not the case when it comes to other devices.
Based on some of the already posted solutions, I have done :
- Binding Django server to IP :
0.0.0.0:8000
by runningpython .\manage.py runsslserver --certificate .\ssl\server.crt --key .\ssl\server.key 0.0.0.0:8000
(I am using SSL for both client and server). - Setting
ALLOWED_HOSTS
to['*']
in settings.py.
But the error is still persistent. All the devices (including my local machine) which I am using is Windows if that's important.
Can someone help me in fixing this issue? Or are there any other way to run the API server?