Deployment¶
Backendless CodeRunner™ includes a command line utility enabling deployment of custom server code to Backendless. Once the code is deployed, it is immediately "activated", which means:
- API Services - published service code is packaged as API Services. REST endpoints and native SDKs are generated.
- API Event handlers - attached to the API invocation chain. The code will be triggered when the corresponding APIs are invoked by the clients.
- Timers - timers are scheduled and begin their execution according to the declared schedules.
To deploy the code:
- In a command prompt window change the current directory to
[backendless-coderunner-home]/bin.
- Run the following command:
Linux:
./Deploy.sh
Windows
Deploy.bat
- Once the deployment script runs, it should produce the following output:
./Deploy.sh
[INFO] JDK from "JAVA_HOME" - /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
[INFO] CodeRunner(tm) Backendless Debugging Utility
[INFO] Copyright(C) 2017 Backendless Corp. All rights reserved.
[INFO] Version: 4.0.0 Build date: 20170429-0707
[INFO] CodeRunner session is running for 2 hour and will be terminated on 20:11:51.591[UTC]
[INFO] Registering runner on: 'http://api.backendless.com' with version 'v1'
[INFO] Application ID: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX'
[INFO] Secret key: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX'
[INFO] Runner successfully registered
[INFO] Parsing event model...
[INFO] Build successfully: 2 handlers, 1 timers, 1 service
[INFO] Deploying model to server, and starting debug...
[INFO] Model successfully deployed.
[INFO] Waiting for events...
[INFO] Publishing 2 event handlers and 1 timers and 1 service to the server…
[INFO] Service published
[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
You can verify the production deployment in Backendless Console. API services appear on the Business Logic > API SERVICES screen under the DEPLOYED SERVICES heading:
For event handlers and timers, open the Business Logic section and navigate to either EVENT HANDLERS or TIMERS. Event handlers and timers deployed to production appear with the green color code:
Important
The cumulative size of the deployed code (which includes all dependencies) is limited for the Backendless Online deployments to 2 megabytes. It can be expanded by purchasing a Function Pack from the Backendless Marketplace. This limitation does not exist in the Managed Backendless and Backendless Pro versions of the service.