In this Bond pricing example, assuming the hostname of your virtual machine is VM_HOST, you need to change the following line of calculatePrice.js. var url = "http://VM_HOST:9910/BondTools/pricecalc";
Because calling MATLAB Production Server is based on HTTP or HTTPS on TCP, so you don't need to specify the actual server path of MATLAB Production Server. In this example, BondTools is CTF name and pricecalc is MATLAB function name.
Also, since you're accessing MATLAB Production Server from different host, I mean, client (HTML file) is on physical machine (let's say hostname is YOUR_HOST) and MATLAB Production Server is on virtual machine(VM_HOST, you need to set Cross-Origin Resource Sharing (CORS) properly in config/main_config file. If you want to allow accessing from only YOUR_HOST, you need to change cors-allowed-origins as follows,
--cors-allowed-origins http://YOUR_HOST
or if you want to allow accessing from any host,
If you're using MATLAB Production Server R2017a, you can use dashboard and it's easier to deploy ctf, change HTTP/HTTPS settings and resources, and monitor the status of MATLAB Production Server instances. To setup MATLAB Production Server dashboard, please see this doc; Set Up and Log In to MATLAB Production Server Dashboard
Best Answer