How to Upload Atom Files to Live Website

Edit on a remote server with Atom and FTP

Feb. xiii, 2019 Chris Shaw 8506 views

I will start by stating, this is probably non the all-time practice, but it is actually convenient to be able to connect to and edit you lot live site using Atom on your machine. It certainly beats shelling in and editing with an editor similar Vim or trying to use the cPanel file manager to find and edit files.

Cantlet has been my 'go to' editor for a few years at present, thank in no small part to information technology being open source, AKA free. In fact I grew so used to using in in a local development environment, that I wanted to use it on remote servers besides. And, as information technology turned out, was very easy to achieve, thanks to the 'remote-ftp' package.

To install, but open Atom and click on the menu items: Packages > Settings View >Install Packages/Themes. Next Type 'remote-ftp' in the 'Search Packages' field. The elevation issue should be 'remote-ftp' past icetee. Click install to install the package. Once installed, click the setting button and scroll downwardly till you observe the readme. Here y'all will discover some configuration files that you can copy from here or information technology is also farther in this commodity.

Start a new projection folder in a location of your selection. Using the control line, create and edit a new file in this folder called .ftpconfig.

          user$ touch .ftpconfig user$ vim .ftpconfig        

Start by pasting the sample config here. We then just have to change v settings.

  1. host: The hostname of your hosts FTP server
  2. port: The port number of your hosts FTP server, modify if host is non using standard port 21.
  3. user: The FTP username provided by your host.
  4. countersign. The FTP countersign provided by yous 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 hallmark. Default: 'anonymous'     "laissez passer": "FTP PASSWORD", // cord - Password for authentication. Default: 'anonymous@'     "promptForPass": false, // boolean - Set to true for enable password dialog. This will foreclose from using cleartext password in this config. Default: false     "remote": "Binder/",     "secure": false, // mixed - Set to truthful for both control and data connectedness encryption, 'control' for command connexion encryption only, or 'implicit' for implicitly encrypted control connexion (this mode is deprecated in modern times, but normally uses port 990) Default: false     "secureOptions": zippo, // object - Boosted options to be passed to tls.connect(). Default: (null) see https://nodejs.org/api/tls.html#tls_tls_connect_options_callback     "connTimeout": 10000, // integer - How long (in milliseconds) to wait for the control connectedness to be established. Default: 10000     "pasvTimeout": 10000, // integer - How long (in milliseconds) to wait for a PASV information connection to be established. Default: 10000     "keepalive": 10000, // integer - How ofttimes (in milliseconds) to send a 'dummy' (NOOP) command to go on the connection alive. Default: 10000\. If prepare to 0, keepalive is disabled.     "watch":[ // array - Paths to files, directories, or glob patterns that are watched and when edited outside of the cantlet editor are uploaded. Default : []         "./dist/stylesheets/main.css", // reference from the root of the project.         "./dist/stylesheets/",         "./dist/stylesheets/*.css"     ],     "watchTimeout":500 // integer - The elapsing ( in milliseconds ) from when the file was last changed for the upload to begin. }        

The write and exit.

In cantlet, start a new project File > New Window, and add the folder File > add together Project Folder and select the binder 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 push button, that volition bring upwardly the remote tree view.

That is it. Y'all can at present double click on a file to download it for editing and when you relieve it is automatically uploaded. The image below is a sample django projection. Merely also works for whatever editable file on your server.

If your computer goes to sleep 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 accept inverse, so you dont need to worry.


forbisforend.blogspot.com

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

0 Response to "How to Upload Atom Files to Live Website"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel