Hey thanks for the post. I am trying to use websocket too in my express app deployed in digitalocean, either with socket.io or ws, but it doesn't work. My question is do I need to do all the stuff you comment on your post (Cloudfare, nginx, ...)? Why is this needed? I am a completely newby in these things. Does digitalocean uses Cloudfare out of the box? I also have the same ubuntu version as yours in my droplet. Thanks for your post, it can save me.
I usually use Cloudflare for my websites because of the free SSL (and also some other cool features). Nginx is for reverse proxy. Basically routes the traffic coming from outside world to my app that is running on port 8000 in 127.0.0.1. You need something like this for production servers. Another popular alternative is Apache web server. Widely used like in the LAMP stack (PHP/WordPress type sites). No, Digital Ocean does not use Cloudflare out of the box.
Hello thanks for your reply and the post. I have a little of mess in my head. I've done everything you put on the post. I have nginx on my droplet, etc. In nginx config I do:
proxy_pass localhost:8080;
But when I do 'sudo netstat -plunt' I don't see any process listening on port 8080. I have my app deployed with 'app platform' in theory listening at port 8080. It is not the same 'app platform' than the droplet? Have you encountered this same issue? If you could help me on this I would be very much appreciated. Thanks and sorry my bad english.
Hey thanks for the post. I am trying to use websocket too in my express app deployed in digitalocean, either with socket.io or ws, but it doesn't work. My question is do I need to do all the stuff you comment on your post (Cloudfare, nginx, ...)? Why is this needed? I am a completely newby in these things. Does digitalocean uses Cloudfare out of the box? I also have the same ubuntu version as yours in my droplet. Thanks for your post, it can save me.
I usually use Cloudflare for my websites because of the free SSL (and also some other cool features). Nginx is for reverse proxy. Basically routes the traffic coming from outside world to my app that is running on port 8000 in 127.0.0.1. You need something like this for production servers. Another popular alternative is Apache web server. Widely used like in the LAMP stack (PHP/WordPress type sites). No, Digital Ocean does not use Cloudflare out of the box.
Hello thanks for your reply and the post. I have a little of mess in my head. I've done everything you put on the post. I have nginx on my droplet, etc. In nginx config I do:
proxy_pass localhost:8080;
But when I do 'sudo netstat -plunt' I don't see any process listening on port 8080. I have my app deployed with 'app platform' in theory listening at port 8080. It is not the same 'app platform' than the droplet? Have you encountered this same issue? If you could help me on this I would be very much appreciated. Thanks and sorry my bad english.
Hi, I hope you resolved your issue. Sorry I didn't see your reply earlier. Did you make sure your app was running at first?