Source code for the CVC web client
Deployment of CVC-webclient is easy since it is a static web app. You only need to do the following:
- Copy the files under the app directory to the web server.
The directory path in milner is
/var/lib/tomcat7/webapps/app
- Update the configurations.js file to specify the api URL for the kind server:
// production api Url
// kindEnvironment.apiUrl = "https://kind.cs.uiowa.edu/cvcservices/";
// development api Url
kindEnvironment.apiUrl = "http://localhost:8080/";
- Change the base tag in index.html to reflect the deployment path.
For milner the deployment path is
http://kind.cs.uiowa.edu/cvc-app/
therefore, the base would be/cvc-app/
<head>
<base href='/cvc-app/'/>
...
</head>
The web client is using AngularJS framework which needs an http web server for loading the app files. Any http web server can work. Alternatively the kind2-webclient is configured to use a simple static web server http-server. The following steps are only needed in the development environment with http-server :
- Install Node.js
- Run
npm install
to install the required packages - Run
npm start
to start the http-server. Since port 8080 may be allocated to the kind server, the http-server is configured to use port 8000. To access the kind2-webclient use the urlhttp://localhost:8000
- Update the app/configurations.js file to specify the api URL for the kind server
- If the kind server is in a different server or has a different origin, browsers will complain about same-origin policy and block AngularJS Ajax requests. Any extension that enables cross-origin resource sharing CORS can be used for development. For chrome you can use this plugin