preface
AutoJs Web Control is based on NodeJS typescript Vuejs and other front-end language development, can achieve Android mobile phone root-free group Control system, this article describes in detail how to compile and deploy AutoJs Web Control.
Open source document
-
Autojs official documentation
-
Autojs source
-
Autojs Web Control
AutoJs Web Control is divided into two parts, Web is the user operation interface, server is the server, respectively compiled and transmitted to the server deployment start.
Environmental requirements
- nodejs
- Webstorm [other development tools are also available, I’m using WebStorm here]
- git
- mysql
Environment set up
Database environment
-
Create a new database with whatever name you like, autojs_control in this case
-
Importing database Scripts
File Location:
autojs-web-control/cloud_auto.sql
autojs-web-control/update.sql
Import the source code
-
Use Git to pull the source code
Git clone github.com/zrk1993/aut…
-
Import Webstorm
-
Modifying database Connections
File Location:
autojs-web-control\server\utils\db.ts
Deploying the server
-
Go to the autojs-web-control/server/ directory
-
Run NPM install to generate the node_modules directory
-
Modify the output directory of compiled files,
autojs-web-control\server\tsconfig.json
"OutDir ": "./" Adjust to "outDir": "./dest"Copy the code
-
Run NPM run build to compile
-
Add the start command script
"scripts": { "build": "tsc -p tsconfig.build.json"."clean": "ts-clean"."lint": "tslint --fix -p tsconfig.json -c tslint.json"."start": "node ./modules/default/main.js" } Copy the code
-
Deploy and start
-
Create a folder autojs_server
-
Copy all directories in modules node_modules package.json dest to autojs_server
-
Run the NPM start command to start the server
-
Deploy the Web side
-
Go to the autojs-web-control/web/ directory
-
Run the NPM install command to install the file
-
Install the vue
npm install -g @vue/cli
vue add unit-jest
-
Edit the autojs-web-control\web\. Env. staging file to change the server connection address (optional for the same server)
NODE_ENV = production # just a flag ENV = 'staging' # base api VUE_APP_BASE_API = 'http://localhost:9317'VUE_APP_WS_HOST ='ws://localhost:9317'Change to the server IP addressCopy the code
-
For example, run NPM run dev on the local PC to start the Web program. You can skip the subsequent step to publish the web program to the server
-
Run NPM run build:stage to generate the dest directory
This step is optional. For example, run NPM run dev on the local PC to start the web program. Follow-up steps are not required
-
Copy the dest directory file to the server and publish it.
Verify release
-
Visit http://localhost:9528 to access the landing page
The default user name is admin
Default password: 123456
Both the user name and password can be changed in the autojs_control.t_admin database
-
You can select devices and execute scripts
conclusion
The above is the entire process of Autojs Web Control deployment. If you have any questions or exchanges, please feel free to comment @me.