Hi,
After struggling A LOT, I finally was able to run socket.io on a shared hosting through cpanel application manager. It turns out that when registering the application you MUST leave the Base Application URL field empty, no matter what folder you plan to access your app from.
Lets say my domain is example.com and I want to install my chat on a folder called myapp so you can access it from here: example.com/myapp
As registering the app, you come across a filed that says:
Base Application URL: Enter the application’s base URL. After you register the application, you can use this URL to access it.
common sense tells you to enter "myapp" , right? Well, IGNORE that because if you enter anything else than a single / your socket.io app wont work. In order to be able to access it from the folder you want you must declare it within the app.js file like this:
app.get('/myapp', (req, res) => {
then your app will work. However, notice that your ENTIRE DOMAIN will be now under the node.js, server, not only the folder where you access the app from which I dont think its right.
Is this a cpanel bug or a socket.io bug? Or am I missing something.
Thank you.