I have installed Powerbuilder 2022 R2 Build 2819 and deployed my applications and WebAPI. In the previous release, I was able to change the Web API URL by using the command "dotnet customizedeploy.dll -url=<url> as mentioned in the help file below.
https://docs.appeon.com/ps2022/Change_the_Web_API_URL_for_an_application.html
With this new release, when I run the above command it does not recognize the URL parameter and outputs the following.
The syntax of this command is:
dotnet CustomizeDeploy.dll -src=<source file> -dest=<destination file>
dotnet CustomizeDeploy.dll -encrypt=<string>
dotnet CustomizeDeploy.dll -encrypt=<string> -outfile=<output file>
How do I change the web api url with this new release?
(Get-Content .\apprun.json) -replace '"web_api": ".*"', '"web_api": "http://new url"' | Set-Content .\apprun.json
You could write this into a ps1 file and from the BAT script invoke PowerShell with the ps1 as argument
Thanks for your help. Since the API is running in "http:\\localhost:80\SA", I couldn't find a way to just replace the word "localhost" with the URL. So I used the below script. Would you happen to know how to just replace the word localhost in the text above with the URL
(Get-Content .\apprun.json).replace('localhost', 'URL') | Set-Content .\apprun.json