0

First of all I saw this post and it is almost what I need but I am a bit confused.

If I am using shared hosting that allows me to install node, socket etc...

But I have one server. How can I use realtime with node/socket on my apache server... Basically i am wondering how does it works... Everywhere i searched i found how to create node server and set up website there but I want to use node/socket only for realtime data fetch.

So beside how to run that on apache server I want to know this:

If my website with code like:

<input type="text" name="text">
<input type="submit" name="send" value="Send">

And I have ajax for sending data somewhere and update database. I don't understand now what I am saying to node? "Connect to that database and get new data each time it is updated." Or something else?

Or on the mentioned post someone commented use node to store your data it is faster?

How that work? How can I communicate with node? I am so confused....

Community
  • 1
  • 1
  • Ajax is different from socket.io Both have their advantages and features. ur apache can handle ajax well but node might be a better soln for sockets. – Iceman Jul 13 '16 at 19:48
  • Can I use node to connect on apache server without creating new one? @Iceman – Mr. Stupid Jul 13 '16 at 20:00
  • I usually create a standalone server in node. (node implements its own server, but can run on a different port). this can say fetch from the same database. but then thats only 1 workflow. its upto u – Iceman Jul 13 '16 at 20:02
  • I am not used to use servers if I need to use one like digital ocean? Am I one who is securing whole server from like attacks with metaspliots etc? – Mr. Stupid Jul 13 '16 at 20:09
  • if you are using a vps solution or full server of sorts then yes you have to setup the firewall and all the bells and whistles. shared web hosting where you have just ftp access to put files, you only need to worry about application security of your web app! – Iceman Jul 13 '16 at 20:10
  • And shared hosting with ssh access? Sorry for of topic questions – Mr. Stupid Jul 13 '16 at 20:13
  • no worries. depends. did you install apache? then you are responsible for it. – Iceman Jul 13 '16 at 20:15
  • I am about to buy it soon I am waiting my bank acc... Its here as their support says their most expensive plan supports ssh access node etc... http://uniwebhosting.com/hosting.html It is like 2.5/m which is like 30e/y which is nothing. – Mr. Stupid Jul 13 '16 at 20:20
  • @Iceman Or if you have a better solution for realtime chat ? I made one but it is not that good and I haven't see different style with ajax and php I can website I am working on and login info if you want to see how I did chat – Mr. Stupid Jul 13 '16 at 20:25
  • so, yes a realtime chat using sockets with node is a good soln. ajax for chat not so much. also depends what you mean by ssh access. – Iceman Jul 13 '16 at 20:49
  • Pff I am looking up to this digital ocean lowest prize hopefully I am not that unlucky to get hacked or something same day :D And what can you tell me for os? Which should begginer use? I know to install apache node etc like on my pc localhost is it same? – Mr. Stupid Jul 13 '16 at 21:13

0 Answers0