DEV Community

Herman Wong
Herman Wong

Posted on

Development on Remote Server

Problem Statement

Earlier last year, I switched my development setup to a cloud server that is hosted on vultr.com. (They're not sponsoring me or anything, I just decided to use them on a whim)

When I am using VIM, and not Visual Studio Code, any changes that are hosted with HTML are not automatically loaded on the server. It started to get really tedious to refresh my web browser to see the page updated.

Since my applications are hosted behind myProxy, hot module reload with Parcel doesn't work.

Why

Since I have both a desktop and a laptop PC, it has become painful to sync my repo using Git. If I develop on a remote server, then I have the same exact environment on any computer.

Solution

I have a workaround that works for development purposes. I realize that how SSL is interfering with the Hot Reload Module. I got around this by using your_domain:PORT. Since the certificate is only served over port 443 this resolves the issue. Keep in mind this is only for development purposes. Any application that is serve on the internet should use HTTPS

Alternative Solution

VS Code has a port tunneling feature. This allows the developer to go to localhost:port and other people can still see the progress with the public URL.

Top comments (0)