Integrating 3rd party node librarys in cloudless code

Hello!

I’m in the process of developing an API endpoint within my teams backendless application. To do this I’m creating and registering a service in cloud code. Some of the functionality of the service ideally would like to use a 3rd party node library. I’m still relatively new to backendless, but I couldn’t find anything in this in the documentation. Is there a way to accomplish this in cloud code? If so, could you point me in the right direction?

Hello @braxton_kinney

We will be happy to assist you. I need to ask you a few more questions so I can understand the problem better.
What language do you use when developing API endpoint: JS or Codeless?

Regards,
Volodymyr

Here is the description:
Codeless - How to use NPM modules in Codeless logic in API Services, Event Handlers and Timers
JavaScript/NodeJS - Installing Custom Modules - Developing Backendless Server Code with node.js

Regards,
Volodymyr

Hello Volodymyr!

Thank you for getting back to me, I’m developing in the API endpoint in Javascript. These links are helpful but I am still a little lost, and I think this is due to my inexperience with Backendless and workflows regarding Backendless API services. Regarding the “Installing Custom Modules” link, there isn’t a console / terminal within Backendless to my knowledge, so I’m assuming we run npm commands to download third party packages locally in an associated project directory. After this is where I have gaps in my knowledge - I’m able to run js files locally on my machine, but how do I register this Javascript file containing code from a third party module from my machine to my Backendless application? And can I do this in cloud code? Or do I have to register this service using the SDK?

Would you be able to point me in the right direction again?
Thank you so much

Hi @braxton_kinney ,

Here is the way to create an API service
https://backendless.com/docs/bl-js/bl_advanced_quick_start_setup.html

Once you have downloaded this project locally, you can use npm i any library in this project to install any dependencies, in order to publish the written code you need to call npm run deploy, after which your API service will appear in Cloud Code.

If you have any questions, we are always ready to help you.

Regards,
Sergey