Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
eric_careta
New Contributor II

Multiple baseUrls of RequireJS in a remote server mashup

Hi everyone,
I'm working on a project based on a qliksense mashup. This project is hosted in a different server than qliksense server.

The problem is that the project uses requireJS to import everything and the baseURL of the requirejs config is a folder of this server.
To use Qliksense API I need to use the baseURL of the qliksense server too..

At this point..my questions are:

It's possible to declare two baseURL o something like that? How?

If this is not possible, are there any way to solve my problem?

Thanks a lot!

Tags (2)
1 Reply
Employee
Employee

Re: Multiple baseUrls of RequireJS in a remote server mashup

Hi Eric,

I think you should be able to do:

require( ["js/my_internal_module"], function ( myInternalModule ) {

         //get all you "local" modules

     require.config( {

          baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port: "") + config.prefix + "resources"

     } );

     require( ["js/qlik"], function ( qlik ) {

          //use myInternalModule and qlik

     });

});

    

I hope this helps,

Community Browser