Overview
Develop OJ use Lrun to control and detect the time of judgment. Lrun uses Linux-specific features, so can only run him under Linux, the server uses Docker deployment is also required Linux environment. Before doing the experiment is to take the manual upload manually restart node, the development efficiency is very low.
Now through this webstorm to achieve ctrl+s trigger upload automatic contrast files, automatic exclusion file (node_module), through SFTP upload to the server, Superviosor automatically detect file changes, automatic restart. Install SFTP
Server uses centos7.0
Installation tutorials are also Baidu's.
Here is not to repeat. Configuration of Webstrom 1. Configure Remote SFTP server
File-setting Open Settings page build,execution,deployment-deployment
Add a SFTP server
Fill in Server information
Configure Mappings
Configuration exclusions, this can be node_module out
Server is set locally
Start Ctrl+s Trigger Upload
Right-click on item to start uploading for the first time
This webstrom configuration is complete, triggering the upload configuration via Ctrl+s supervisor
sudo npm install supervisor-g
Supervisor Www/server.base.js
This is configured as a Package.json script
You can then turn on automatic restart via npm run dev