avatar_url

Sandesh Rana | Python

I'm a developer from Himalayas, with a passion for crafting efficient and elegant code, with creativity and precision.

Run saleor dashboard in local network

26 Jan 2022 » django
  • <ip-address> should be your ip address and is exclusive of http protocol (http:// or https://).
settings.py [in dev mode.]

....
DEBUG = True
ALLOWED_HOSTS = ['<ip-address>']
....
  • runserver django server with ./manage.py runserver <ip-address>:8000
  • edit your webpack.config.js file
webpack.config.js [in dev mode.]

....
host: '<ip-address>',
disableHostCheck: true,
port: 9000
....
  • edit your src/config.ts file
src/config.ts [in dev mode.]

....
export const API_URI = "http://<ip-address>/graphql/";
....
  • runserver dashboard server as usual.
  • also you might need to allow external request with ufw
  • sudo ufw allow <port-number> in this case 9000.

Reference