Here is a live demo of the activiti created using AngularJs
In the previous post about angular.js and activiti-rest application we have shown how to list users, groups and login. Recently we have decided to fork activiti-webapp-angular and add all of the features from part I in it. Hopefully that this will be real activiti angular.js version.
In this post we are going to explain how to use gruntjs and angular.js and be able make cross domain http requests without worrying about Access-Control-Allow-Origin.
In our case we have
- Tomcat that runs on port 8080
- gruntjs that runs on port 9000
- Apache that runs on port 80
To solve our problem we are going to setup proxy on Apache server that will :
- proxy path localhost/ -> localhost:9000/
- proxy path localhost/service -> http://localhost:8080/activiti-rest/service/
This way angular.js application is communicating with itself and there is no access-control problem :).
After installing Apache add next modules
- LoadModule proxy_module modules/mod_proxy.so
- LoadModule proxy_http_module modules/mod_proxy_http.so
in httpd.config add
ProxyPass /service/ http://localhost:8080/activiti-rest/service/ retry=0 timeout=30 ProxyPass / http://localhost:9000/ retry=0 timeout=30
How to use
Access your application on localhost/ , or if you have any other configuration add your Apache url.
You can read the post about activiti and angular.js here.