|
@@ -1,3 +1,30 @@
|
|
|
+const initConfig = () => {
|
|
|
+ fetch("https://static.tiktokjakjkl.icu/test/index.json", {
|
|
|
+ mode: "cors",
|
|
|
+ headers: {
|
|
|
+ "content-type": "application/json",
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => res.json())
|
|
|
+ .then((data) => {
|
|
|
+ console.log(`🚀🚀🚀🚀🚀-> in instrumentation.ts on 10`, data);
|
|
|
+ globalThis.config = {
|
|
|
+ NEXT_PUBLIC_BASE_URL: "http://192.168.0.84:8800",
|
|
|
+ NEXT_PUBLIC_SHARE_URL: "http://192.168.0.84:3000",
|
|
|
+ };
|
|
|
+ });
|
|
|
+};
|
|
|
export async function register() {
|
|
|
- console.log(`🚀🚀🚀🚀🚀-> in Instrumentation.ts on 3`, 1);
|
|
|
+ initConfig();
|
|
|
+ setInterval(() => {
|
|
|
+ initConfig();
|
|
|
+ }, 100000);
|
|
|
+ if (process.env.NEXT_RUNTIME === "nodejs") {
|
|
|
+ }
|
|
|
+
|
|
|
+ if (process.env.NEXT_RUNTIME === "edge") {
|
|
|
+ console.log(`🚀🚀🚀🚀🚀-> in instrumentation.ts on 26`, 123);
|
|
|
+ process.env.NEXT_PUBLIC_CONFIG_URL = "http://192.168.0.84:8800";
|
|
|
+ // sessionStorage.setItem("http://192.168.0.84:8800", "NEXT_PUBLIC_CONFIG_URL");
|
|
|
+ }
|
|
|
}
|