WebStorm 2021.2 Help

Deploy your application部署应用程序

WebStorm assumes that all development, debugging, and testing is done on your computer and then the code is deployed to a production environment.WebStorm假定所有的开发、调试和测试都在您的计算机上完成,然后将代码部署到生产环境中。

The reason to stick to this "local development - deployment" model lies in the way WebStorm provides code completion, code inspections, code navigation, and other coding assistance features. 坚持这一点的原因是什么;“本地开发-部署”;模型在于WebStorm提供代码完成、代码检查、代码导航和其他代码辅助功能的方式。All this functionality is based on the project files index which WebStorm builds when the project is loaded and updates on the fly as you edit your code.所有这些功能都基于WebStorm在加载项目并在编辑代码时动态更新时构建的项目文件索引

To provide efficient coding assistance, WebStorm needs to re-index code fast, which requires fast access to project files. 为了提供高效的编码帮助,WebStorm需要快速重新索引代码,这需要快速访问项目文件。The latter can be ensured only for local files, that is, files that are stored on you hard disk and are accessible through the file system.后者仅适用于本地文件,即存储在硬盘上并可通过文件系统访问的文件。

Interaction between WebStorm and serversWebStorm与服务器之间的交互

Interaction between WebStorm and servers is controlled through server access configurations. WebStorm和服务器之间的交互通过服务器访问配置进行控制。Anytime you are going to use a server, you need to define a server access configuration, no matter whether your server is on a remote host or on your computer.无论何时要使用服务器,都需要定义服务器访问配置,无论服务器是在远程主机上还是在计算机上。

Taking into account all the above, let's define the following basic concepts related to synchronization between WebStorm and servers.考虑到以上所有因素,让我们定义以下与WebStorm和服务器之间的同步相关的基本概念。

  • In the in-place server configuration, the web server is running on your computer, your project is under its document root (for example, in the /htdocs folder), and you do your development directly on the server.在就地服务器配置中,web服务器在您的计算机上运行,项目位于其文档根目录下(例如,在/htdocs文件夹中),您直接在服务器上进行开发。

    The document root of an in-place server is the parent of the project root, either immediate or not. 就地服务器文档根目录是项目根目录的父目录,可以是立即的,也可以不是。The document root is the web root or website root directory. 文档根目录是web根目录或网站根目录。Usually, it is the publicly-accessible base folder for a website.通常,它是网站的公共可访问基本文件夹。

  • In the local server configuration, you do your development, then copy the sources to the server.在本地服务器配置中,进行开发,然后将源代码复制到服务器。

    A local server is a server that is running in a local or a mounted folder and whose document root is NOT the parent of the project root.本地服务器是在本地或装入的文件夹中运行的服务器,其文档根不是项目根的父级。

  • In the remote server configuration, a server runs on another computer (a remote host). 远程服务器配置中,服务器在另一台计算机(远程主机)上运行。To access files on the server, use FTP/SFTP/FTPS protocols.要访问服务器上的文件,请使用FTP/SFTP/FTPS协议。

  • The server configuration root is the highest folder in the file tree on the local or remote server accessible through the server configuration. 服务器配置根目录是通过服务器配置访问的本地远程服务器上文件树中的最高文件夹。For in-place servers, it is the project root.对于就地服务器,它是项目根目录。
  • A local file/folder is any file or folder under the project root.本地文件/文件夹是项目根目录下的任何文件或文件夹。

  • A remote file/folder is any file or folder on the server.远程文件/文件夹是服务器上的任何文件或文件夹。

  • Upload is copying data from the project TO the server, either local or remote.上载是将数据从项目复制到服务器(本地或远程)。

  • Download is copying data FROM the server to the project.下载是将数据从服务器复制到项目。

After you have configured synchronization with a server, you can upload, download, and manage files on it directly from WebStorm. 在配置了与服务器的同步后,可以直接从WebStorm上载、下载和管理服务器上的文件。Moreover, you can suppress uploading or downloading specific files or entire folders. 此外,您可以禁止上载或下载特定文件或整个文件夹。Finally, you can optimize you workflow by configuring content roots so specific folders are not involved in indexing, which significantly saves project indexing time.最后,您可以通过配置内容根来优化工作流,从而使特定文件夹不参与索引,从而显著节省项目索引时间。

Synchronization with servers, uploading, downloading, and managing files on them are provided via the FTP/SFTP Connectivity bundled plugin, which is by default enabled. 通过默认启用的FTP/SFTP连接捆绑插件提供与服务器的同步、上载、下载和管理服务器上的文件。If the plugin is disabled, activate it in the Plugins page of the Settings dialog. 如果该插件已禁用,请在“设置”对话框的“插件”页面中激活它。For details, see Manage plugins. 有关详细信息,请参阅管理插件

Last modified: 21 June 2021