XWorker's model editor can also run on the WEB, and can dynamically write WEB applications through the browser.
Choose to download the jar of any version of XWorker below, and save it in a directory.
Execute java -jar xworker-x.x.x.jar in the console. Such as:
Select web during installation, and enter 3 in the option.
After the installation is complete, execute web.cmd or web.sh to start the WEB server.
As shown in the figure below, the port number and the address of the editor will be displayed after startup.
The default context path of the Web server model is /, which starts from port 9001 to find an unoccupied port by default.
You can customize the Web server model, the custom model path is _local.xworker.config.WebThingEditor, it will replace the default Web server model. Such as:
<?xml version='1.0' encoding='utf-8'?> <JettyServer name="WebServer" descriptors="xworker.jetty.JettyServer"> <Handlers> <WebAppContext name="WebAppContext" contextPath="/myapp" webApp="./webroot/" resourceBase="./webroot/" dirAllowed="true"/> </Handlers> </JettyServer>
If the web server is running on the server, such as through nginx reverse proxy, then configure the final URL path, otherwise an error may be reported in the web version of the model editor.
The configuration method is to open the _local.xworker.config.GlobalConfig model, modify the webUrl property, and set it to the final web address.
Input the address of the model browser in the browser, for example, the address in the above picture is assembled: http://localhost:9002/rap?app=xworker.webthingeditor.Login .
After the login window is displayed in the browser, enter the user name and password, where the user name is admin, and input a random password for the first time. After clicking Login, a random password will be created, and the prompt box will be displayed. Password.
If you forget the password, you can also use a text editor to open the corresponding model to modify the password. The model path to save the password is: projects\_local\things\_local\xworker\config\XWorkerConfig.dml, you can use text editor to edit.
After successful login, the model editor will open.