#Possible to run yarn dev not limited to 127.0.0.1?

3 messages · Page 1 of 1 (latest)

deft pendant
#

Hi all.

I am trying to run a Backstage locally in dev mode while also being able to reach it on another computer on my local network. Having an oddly difficult time doing so and my closest guess is that the front-end (with a completely vanilla npx @backstage/create-app@latest setup) only listens on loopback/127.0.0.1 ? Is there a way to make it use 0.0.0.0 instead like there is for the backend?

This feels like a thing buried deep within webpack config hiding inside the backstage cli maybe?

Using a completely separate local nginx solely to proxypass from loopback to an exposed port I can reach from elsewhere feels absurd somehow 😅 I'm probably supposed to run it entirely differently like more properly via Docker or somesuch but this turned into one of those rabbit holes and now I'm committed 🥼 ...

#

For a little bit of logging this is the startup snippet that makes me think loopback even if it does list localhost:3000 (which does work ... locally - but not via port 3000 elsewhere):

$ concurrently "yarn start" "yarn start-backend"
$ yarn workspace backend start
$ yarn workspace app start
$ backstage-cli package start
$ backstage-cli package start
[1] Build succeeded
[0] Loaded config from app-config.yaml
[0] <i> [webpack-dev-server] Project is running at:
[0] <i> [webpack-dev-server] Loopback: http://localhost:3000/, http://127.0.0.1:3000/
deft pendant
#

Looks like I figured this out - for some reason I had figured app.baseUrl was something more used by the UI to make valid URLs (partly since the backend has a split out listen), but after trying to change it to baseUrl: http://0.0.0.0:3000 I can get to it from elsewhere 👍