Backendless Support

Deploying custom business logic (event handlers) to Backendless servers

After  developer has already prepared the code (precise description of the process is given in the related topics: how to generate custom business logic code for API event handlers and how to locally debug your custom code) , it is fully ready to be pushed to the Backendless servers. Once it is out there, the Backendless infrastructure automatically handles scaling the code execution and routing requests to an instance available to run your code. The process for deploying an API event handler is very similar to the one for timers (see deploying custom business logic in timers to Backendless).

The ZIP file you downloaded from the Backendless Console (when it generated the code for an event handler) includes the deploying utility located in the /bin directory. To deploy the code, open a command prompt window and run the Deploy script.

There are two of them, one for Linux ( and the other for Windows (Deploy.bat). When the utility is run, it inspects all the custom code, packages and deploys it to the Backendless servers. 

The utility output would look similar to the one below:

macbook-pro-2:bin mark$ ./
[INFO] CodeRunner(tm) Backendless Debugging Utility
[INFO] Copyright(C) 2015 Backendless Corp. All rights reserved. 
[INFO] Version: 1.13 Build date: 20150320-1727
[INFO] Registering runner on: with secretKey: XXXX-XXXX-XXXXX
[INFO] Runner successfully registered
[INFO] Parsing event model...
[INFO] Build successfully: EventModel{timers=0, eventHandlers=1}
[INFO] Deploying model to server, and starting debug...
[INFO] Model successfully deployed...
[INFO] Waiting for events...
[INFO] Deploying 1 event handler and 0 timers to the server… 
[INFO] Successfully deployed all event handlers and timers. 
[INFO] If you connected to coderunner for debug - please stop debugging
[INFO] CodeRunner will shutdown now
[INFO] Debugging Utility disconnected successfully
[INFO] Thank you for using Backendless

Additionally, once the code is deployed, you can confirm it using the Backendless Console. To do this, open the Production tab in the Business Logic screen. Make sure to select the appropriate category of the event handlers (it is Users in the screenshot below):

Review related topics:

Is article helpful?