How to Upload a File on Atom I

Edit on a remote server with Atom and FTP

Feb. thirteen, 2019 Chris Shaw 8502 views

I will start by stating, this is probably not the all-time practise, but information technology is really convenient to be able to connect to and edit y'all alive site using Atom on your machine. It certainly beats shelling in and editing with an editor like Vim or trying to apply the cPanel file managing director to find and edit files.

Cantlet has been my 'go to' editor for a few years now, give thanks in no small part to it being open source, AKA free. In fact I grew and then used to using in in a local development environment, that I wanted to use it on remote servers too. And, as it turned out, was very like shooting fish in a barrel to accomplish, thank you to the 'remote-ftp' package.

To install, but open Atom and click on the carte du jour items: Packages > Settings View >Install Packages/Themes. Next Blazon 'remote-ftp' in the 'Search Packages' field. The tiptop issue should exist 'remote-ftp' by icetee. Click install to install the bundle. Once installed, click the setting push button and curl down till you observe the readme. Here you will find some configuration files that you tin can copy from here or it is also further in this commodity.

Starting time a new projection binder in a location of your choice. Using the command line, create and edit a new file in this folder called .ftpconfig.

          user$ touch .ftpconfig user$ vim .ftpconfig        

Start past pasting the sample config here. We and then just have to change 5 settings.

  1. host: The hostname of your hosts FTP server
  2. port: The port number of your hosts FTP server, change if host is not using standard port 21.
  3. user: The FTP username provided past your host.
  4. password. The FTP password provided by you host.
  5. remote. The folder your project resides on on the server.
          {     "protocol": "ftp",     "host": "SERVER", // string - The hostname or IP address of the FTP server. Default: 'localhost'     "port": 21, // integer - The port of the FTP server. Default: 21     "user": "FTP USERNAME", // string - Username for authentication. Default: 'anonymous'     "pass": "FTP Countersign", // string - Password for authentication. Default: 'bearding@'     "promptForPass": false, // boolean - Gear up to true for enable password dialog. This will prevent from using cleartext countersign in this config. Default: false     "remote": "FOLDER/",     "secure": false, // mixed - Set to true for both control and data connection encryption, 'control' for control connexion encryption just, or 'implicit' for implicitly encrypted control connection (this mode is deprecated in modernistic times, only normally uses port 990) Default: false     "secureOptions": nix, // object - Additional options to be passed to tls.connect(). Default: (nada) see https://nodejs.org/api/tls.html#tls_tls_connect_options_callback     "connTimeout": 10000, // integer - How long (in milliseconds) to wait for the command connection to exist established. Default: 10000     "pasvTimeout": 10000, // integer - How long (in milliseconds) to wait for a PASV data connectedness to be established. Default: 10000     "keepalive": 10000, // integer - How often (in milliseconds) to ship a 'dummy' (NOOP) command to keep the connection alive. Default: 10000\. If set to 0, keepalive is disabled.     "picket":[ // array - Paths to files, directories, or glob patterns that are watched and when edited outside of the atom editor are uploaded. Default : []         "./dist/stylesheets/primary.css", // reference from the root of the project.         "./dist/stylesheets/",         "./dist/stylesheets/*.css"     ],     "watchTimeout":500 // integer - The duration ( in milliseconds ) from when the file was concluding changed for the upload to begin. }        

The write and exit.

In atom, kickoff a new project File > New Window, and add the binder File > add Project Folder and select the folder with the .ftpconfig file.

To view the remote options in the tree, Packages > Remote FTP > Toggle, then click on the remote tab in the tree. Here you will find a very usefiul connect button, that will bring up the remote tree view.

That is it. You can now double click on a file to download it for editing and when you save it is automatically uploaded. The paradigm below is a sample django project. But as well works for any editable file on your server.

If your computer goes to slumber of the connection is disconnected for some reason, you may demand to disconnect and reconnect. On reconnect, it tends to upload all files that may take changed, so you dont need to worry.


mooresheophy.blogspot.com

Source: http://django.co.zw/en/tutorials/edit-on-a-remote-server-with-atom-and-ftp/

0 Response to "How to Upload a File on Atom I"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel