Server variable or something? 🧐

Is it possible to make a var that can be changed from different devices on the same page?

I know that I might need a server, but I actually tried searching this up, and just had trouble understanding how to make a server variable, so if someone could break it down to me, that’ll be great!

Hi @Hamzah_Alani,

you would indeed need a server. You can access the window-environment of the browser (just tried :slight_smile: ) so you could get/set parameters that way… Of course, the server would have to remember the parameter etc etc, but it looks like it could be doable…

Other than that, I cannot see how you would be able to share a variable accross instances of Wick…

What are you trying to achieve? Maybe if we knew more, we could help you further?

regards,

Paul

cloud multiplayer games, cloud save, stuff like that I guess

Nah, I’m just trying to see if I can change the value of a variable for any type of website across different devices.

You know, like if something happens on one device, a new definition of var? Why var in specific? Because when a variable is redefined, you could literally do anything, redefine x, y of something, change a value/ name, make multiplayer games, create global stuff, etc etc.

Yea, and work on the stuff that Baron mentioned too. There’s just endless possibilities!

I’m not working on anything at the moment, it’s just curiosity that made me ask this question

Well you can get a server?? at repl.it. You can make a node.js repl or something in node.js and you can send requests to your repl. And you can write a program that receives/fulfills those requests on the server using node.js which is just basically JavaScript but for servers. You can also use websockets for instant communications. I think you can do this in python too.

this sounds like an advertisement

1 Like

Yea, I already use repl.it (I think I mentioned this somewhere on wick),
which makes the server part easy. Thanks though for breaking it down.