one
Version:
One is a React framework for web, iOS, and Android apps.
25 lines (22 loc) • 735 B
JavaScript
import { getDevServer } from "./getDevServer.native.js";
var hasWarnedOnce = false;
function getURL() {
var url = process.env.ONE_SERVER_URL;
if (url) {
return url.replace(/\/+$/, "");
}
if (__DEV__) {
if (!hasWarnedOnce) {
hasWarnedOnce = true;
console.warn(`The ONE_SERVER_URL environment variable is not set. While things will work in development mode as we'll be using your development server, you should still set ONE_SERVER_URL in your .env file for your production builds to work.`);
}
var { url: devServerUrl } = getDevServer();
url = devServerUrl;
}
if (!url) {
url = "http://one-server.example.com";
}
return url.replace(/\/+$/, "");
}
export { getURL };
//# sourceMappingURL=getURL.native.js.map