Use IntelliJ IDEA development tools to write web projects and deploy servers

Use IntelliJ IDEA development tools to write web projects and deploy servers

1. use Idea to write web projects

Project address: Github address

2. use Idea to deploy web projects

1. Use Idea to connect to cloud server

Select Tools-> Deployment->Configuration

In the pop input Host, User name, Passwordconnected to the server cloud

2. Use Idea to Terminal connect to the cloud server

Select Tools-> Start SSH sessionopen the command window for connecting to the cloud server

3. Execute shellcommands in the command window to update the web project code and start the service

uwsgi.shContents of the file reference another article using the django uwsgi Management Services

uwsgi.shThe core code of the file
  • Jump to the djangoserver directory and update the code

    cd $Django_path git pull

  • Use uwsgistartup djangoservice

    uwsgi --ini uwsgi/uwsgi.ini

Execute sh startthe command to start the Djangoservice

So far the Django service has been started

3. Idea connects to the server follow-up

1. Idea to manipulate server files or directories

After using the above connection server operation.

Select Tools-> Deployment->Browse Remote Host

Remote HostYou can operate the file directory of the cloud server in the window that appears on the right side of Idea . Supported operating there , , ,

2. The Automatic Upload option is not tested

Description of automatic upload

Because the Ftpconfiguration of the Tencent Cloud server did not take effect afterwards, there have been problems.

Problems encountered when configuring Ftp View another article: Tencent Cloud Server Configuration FTP

So don't study this anymore