How does one install multiple versions of web appbuilder developer edition on same windows machine?
Only altering the node.js port startup number in startup.bat is not enough.
Thanks
Subu
Solved! Go to Solution.
Subu,
Here is the step for install WAB as a service on a different port than 3344:
Pre-steps:
1. If you had the win service installed make sure you Stop the service.
2. Next uninstall the service. npm run-script uninstall-windows-service
New service steps:
1. Edit the [install dir]\server\package.json by adding the port designation (line 6)
{ "name": "ArcGISWebAppBuilder", "version": "1.1.0", "private": true, "scripts": { "start": "node server.js -port=7000", "install-windows-service": "winser -i",
2. I choose 7000 and based on the code it will use 7000, 7001, 7002
3. Run the npm run-script install-windows-service.
4. Next be sure to start the service.
5. Go to your organizations portal and find where you initially registers the WAB app > choose edit > App Registration > Update > add the new redirect urls.
6. Now launch WAB using the new port.
Word of waning if you change the port used your existing apps will not show up as a new tingo db will be created and it will not know anything about your old apps.
EDIT:
Here is how to get all your old apps back.
1. open the \server\db\apps file in a text editor and copy all content to clipboard.
2. Now open the new \server\db\apps.compact file and select all and paste.
3. Restart the windows service for WAB and all your apps are back.
Now I have 1.1 and 1.2 running at the same time.
Subu,
I have all the betas, 1.1, and 1.2 on the same machine. But I never have had a need to run them simultaneously. Are you attempting to run them at the same time if so why?
Robert,
Big picture: As we have more versions of WAB, more custom widgets and other customizations, I think most developers will end up supporting WAB applications in different WAB versions or different combinations of WAB + custom widget versions.
Also bugs and bug fixes(from both esri and community), I think it is really useful to be able to fire up multiple versions of same development platform/code base for troubleshooting. I do it wherever possible - like with java applications + String tool suite or erdas versions in remote sensing or Having multiple machines to run old versions of ArcGIS desktop.
There are so many variables in the javascript development world. I think it is essential to be able to run multiple WAB developer editions on the same machine to find out why some functionality is working or not working.
If you can help figure out what I am missing in the instructions as far as changing the ports that (WAB + Node) runs on to make multiple versions of WAB run simultaneously, that will be great and possibly help others too.
Thanks
Subu
I think multiple WABs can run on the same machine at the same time if you change the server port number. Please note that one WAB server will occupy 3 ports.
Could you post what error do you get when you run more than one WAB?
Hello Junshan,
My goal is to run multliple versions of WAB on the same machine - each WAB version should run as its own windows service.
I am hoping that you can clarify or elaborate the instructions on this page below so that I can get that right.
Get started—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
So for example.
1. Where do I change the port numbers so that all three ports used by WAB are different for each WAB version?
2. Does each WAB version need a different service name to install a separate windows service? If so, where would I change or customize that?
Thanks
Subu
For changing port, please change port at line 11 in startup.bat
For windows service, please change name in server/package.json
Junshan -
Thanks for the response. But I still need to know where to change the port numbers for the second and third port used by WAB.
Startup.bat only controls the first port -3344. I need to change 3345 and 3346 to something else so that I can have two WAB versions/services running at the same time. I am running into errors like the screenshot below.
Thanks
Subu
In fact, changing the port number on startup.bat has no effect on where node is listening if you install as a windows service.
The server.js file is grabbing the base port from somewhere else -
..........................................................................
var basePort = app.get('port');
var httpPort, httpsPort;
if (basePort === '80') {
httpPort = '80';
httpsPort = '443';
} else {
httpPort = parseInt(basePort, 10) + 1;
httpsPort = parseInt(basePort, 10) + 2;
..........................................................................................
Let me know if I am way off base.
Thanks
Subu
Subu,
Here is the step for install WAB as a service on a different port than 3344:
Pre-steps:
1. If you had the win service installed make sure you Stop the service.
2. Next uninstall the service. npm run-script uninstall-windows-service
New service steps:
1. Edit the [install dir]\server\package.json by adding the port designation (line 6)
{ "name": "ArcGISWebAppBuilder", "version": "1.1.0", "private": true, "scripts": { "start": "node server.js -port=7000", "install-windows-service": "winser -i",
2. I choose 7000 and based on the code it will use 7000, 7001, 7002
3. Run the npm run-script install-windows-service.
4. Next be sure to start the service.
5. Go to your organizations portal and find where you initially registers the WAB app > choose edit > App Registration > Update > add the new redirect urls.
6. Now launch WAB using the new port.
Word of waning if you change the port used your existing apps will not show up as a new tingo db will be created and it will not know anything about your old apps.
EDIT:
Here is how to get all your old apps back.
1. open the \server\db\apps file in a text editor and copy all content to clipboard.
2. Now open the new \server\db\apps.compact file and select all and paste.
3. Restart the windows service for WAB and all your apps are back.
Now I have 1.1 and 1.2 running at the same time.
Robert,
That works. Thanks again for sharing your expertise
Subu