Jump to content
McKay Development

Using node.js with socket.io


Mnt-STVN

Recommended Posts

If I want to connect my website and node.js server I would need to put the ip of the server in my source code but isn't this unsafe because everyone is able to see this if you use javascript, and people could like attack it or something?

 

Also is using socket.io generally the 'best' way to connect a bot and a website or would using socket.io be called 'non-proffesional' and what other options exist? I also haven't seen a big site using socket.io so that makes me wondering, or do they hide it somehow?

 

 

Link to comment
Share on other sites

socket.io is okay but I don't personally recommend it because I personally think it's a bit too much for what it needs to do. Plain old boring websockets are plenty since there's no real need to support browsers that don't support websockets anymore (they've been standard for years now). I made a websocket library but you can use anything.

 

If you want to protect your server from having its direct IP exposed, you could use Cloudflare. They support websockets even on the free plan.

Link to comment
Share on other sites

But using websockets wouldn't necesarilly be the best way to make a deposit/withdraw system?

I have looked around on big sites such as opskins or sites likes csgoempire/csgoroll or that gambling crap but they

don't seem to be using websockets, which makes me wondering again what they do use for these kinds of systems,

that's why I was thinking about not using socket.io because users could also try to send their own requests.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...