Vscode is my favorite editor so far. Because it is highly customizable and has lots of useful extensions. One of these extensions is sftp which makes it possible to work on a remote server with very little lines of configuration.
It won’t be fun to develop apps when you work on a low-spec computer. Some apps may require too much resource. So it makes sense to run them on a remote development server.
Sftp syncs local project files on the specified remote server on each save. That means we can develop our applications on the remote server itself.
Ctrl+Shift+P
and type SFTP: config
on the command palette. This will create a new file named sftp.json
under .vscode
folder.{
"name": "my-config",
"host": "localhost",
"protocol": "sftp",
"username": "USERNAME",
"password": "PASSWORD",
"port": 22,
"remotePath": "/your/project/directory"
}
Make your first change, save it and check it on the remote server. Yes I agree with you, this is kinda magic 🙂
Don’t forget to add your configuration file in .gitignore
in order not to push your credentials to the git repository!!