I have a website written in php. Till now I used setTimeout
with ajax
to update chats simultaneously but after that didn't work I learnt about socket.io. I need to implement private messaging and I have got some things covered in socket.io but when I ran it on localhost
I had to keep the terminal open as long as I wanted to chat.
1. How am I supposed to do that on my server which is Hostinger currently. Is there some terminal I need to run or do I need ssh(shell) access which I don't have at the moment?
2. If there isn't, how would the node script keep running?
3. And since socket uses node, how would the app use node modules? Do they need to be uploaded to the hosting space?
Apart from that, if there is any private messaging and group messaging implementation anyone knows about even other than how it could be done in socket.io it will be very helpful if you could suggest. I need the users to chat among themselves not with me.
Thanks in advance!