Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
eric_careta
Partner - Contributor III
Partner - Contributor III

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!

1 Reply
Aiham_Azmeh
Employee
Employee

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,