问题
I'm building a mobile application using IBM Worklight. In an adapter, I need to use some functionality which is provided by a third party JavaScript file. I want to know if it's possible to include such a file on the server? If not, what is the alternative?
回答1:
At the moment there is no way to include an external JavaScript library in the Adapter code. Currently the only workaround is to copy the library code to the adapter.
回答2:
In Worklight 6.0.0, IBM introduced Node.js adapters, touting "a huge selection of third-party modules extending connectivity and providing implementations of various common backend constructs". That sounds like JS library support to me. Details here: https://www.ibm.com/developerworks/community/blogs/worklight/entry/a_preview_of_node_js_adapters_in_worklight_6_0_0?lang=en
来源:https://stackoverflow.com/questions/21399528/ibm-worklight-include-a-javascript-library-on-the-server-side