deno-musings/test_changer.mjs
2024-10-10 10:01:12 -04:00

14 lines
318 B
JavaScript

export let changing = 2;
const thisURL = new URL(import.meta.url)
const thisFile = thisURL.pathname;
if(!thisURL.search)
{
setInterval(()=>{
import(thisFile+"?"+Math.random()).then(module=>{
changing = module.changing;
console.log(changing);
})
}, 3000);
}