How to access to cloud app running localy from a client app created outside of RHMAP
Issue
- We have a new Ionic 2 project that was started outside of RHMAP. To make it work with RHMAP, I've added the fh_config.json, and feedhenry.js into the www folder. I've then added a reference to feedhenry.js into the index.html. This all works fine.
However, I would like to be able to serve the Ionic app locally to hit a cloud app that's served locally. How do I do this?
My observations: - I see in the feedhenry.js code references to "app_props.local", and it looks like "app_props" is a dependency bought in via browserify.
- I also see in the gruntfile of previous RHMAP projects the following block of code, that looks to be setting the grunt config:
if (target === 'local') {
var conn = 'http://' + grunt.config.get('connect.options.hostname') + ':' +
grunt.config.get('connect.options.port');
var url = grunt.option('url') || grunt.config.get('app.default_local_server_url');
grunt.config.set('app.url', conn + '/?url=' + url);
}
So it the grunt file must be setting it, and the feedhenry.js must be reading it.
Ionic 2, by default, uses gulp instead of grunt. Is there a way I can set this with gulp?
Environment
- Red Hat Mobile Application Platform (RHMAP) 3.13
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.