How can I add Endpoint in expo managed workflows that can be used in stand alone apps too ?

For instance
In app.json

{
  "expo": {
    "name": "My app",
    "slug": "my-app",
    "endpoint":"https://myapp.com"

  }
}

In App.js

const App () => {
/* Here I want to use endpoint in app.json for network requests.
 That should work on stand alone apps or build 
*/

fetch(`${endpoint}/login`, {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    firstParam: 'yourValue',
    secondParam: 'yourOtherValue',
  }),
});

    
    }