Expose replica port in custom build scripts

Azle has a custom build process, and I am trying to construct the full URL that the developer should use to interact with their REST-based Azle canisters. The problem is that I don’t believe the build script has the replica’s port available to it.

I see there are some environment variables like DFX_VERSION and DFX_NETWORK, and maybe CANISTER_ID (not sure if these are some of our own).

Can we have the port? And really anything that would be required to construct this and display it to the user: http://canisterId.localhost:8000. I think we just need the canister id and the port.

There is dfx info replica-port and dfx info webserver-port. Can you work with that or do you need something different?


I can work with that for now, I wonder if an environment variable would be better? But yes I am unblocked thanks!