ORM Studio

QR Access

QR codes for your app URL and the Axil Studio URL, with copy and open buttons, plus what you need to reach them from a phone on your network.

2 min readUpdated DocumentationEdit this page
On this page2

The QR access view (#/qr, shortcut g c) shows two QR codes so you can open a URL on another device without typing it.

The two cards

CardEncodesHow the QR code is made
ApplicationYour app URL, http://localhost: plus the app portGenerated on the server and embedded in the page when Studio loads
StudioThe Studio URL, http://localhost: plus the Studio portRequested from GET /api/studio/qr when you open the view

Each card shows the URL with Copy URL and Open (new tab) buttons. QR codes are produced with the qrcode package, a dependency of @axiljs/studio; if it can't be loaded the card says QR unavailable — install the qrcode package.

Scanning from a phone

Both codes encode localhost URLs, and on a phone localhost is the phone itself. The view reminds you of this.

To reach your machine from another device on the same network you need its LAN address (for example http://192.168.1.20:3000), and the server you want to reach has to listen on 0.0.0.0 rather than only on 127.0.0.1. Then type or share that address instead of scanning.

Warning

Under axil run, Studio binds to 127.0.0.1 and only answers requests whose Host header is localhost, 127.0.0.1, [::1], the bind host, or a name in allowedHosts. Opening Studio from another device therefore needs a programmatic setup with a non-loopback host and the LAN address in allowedHosts. Studio has no authentication, so only do this on a network you trust.

Was this page helpful?

Help improve the documentation

AxilJS is open source and documentation improvements are welcome.

AxilJS DocumentationMIT License · Built by SyntaxilitY