How can antd pro be packaged at once and deployed in many places?

there is a thorny problem, ask the bosses for help

when developing, the front and rear ends are separated, the front end uses the antd pro framework, and the back end uses the antd pro proxy interface for java and tomcat,. The front end is packaged and deployed into tomcat.

the current situation is that the system needs to deploy different servers of different units (the interface IP is also different, only individual units have domain names), but there are a large number of units, and it is not realistic for the frontend to modify the interface address and repackage each time. Is there any way that the frontend can be deployed to multiple servers only once? (I have thought about configuring reverse proxy for Nginx, but I don"t know if it is feasible.)

antd pro

Agent for antd pro

Jan.12,2022

you use gulp to write an automated deployment, such as gulp-cmd and gulp-replace:

instance code

hosts = ['baidu.com', 'sina.com'];
hosts.foreach((host) => {
    gulp-replaceip
    gulp-cmdgulp-sftp
    gulp-cmd 'scp '
})
Menu