Skip to content

Quick Start Guide

This guide will help you develop a basic mobile application up and running with the Backendless 5 backend.

If you use Backendless Pro...

Once the product is installed, there are two URLs to keep in mind:

  1. ** Backendless Console URL** - available at http://HOSTNAME:8080 , where HOSTNAME is the IP address or the hostname confirmed/entered during  the installation. It is not recommended to use localhost if you plan to run your application in a device emulator.
  2. ** API Endpoint URL** - this is the URL where the server accepts and processes the API requests. The API endpoint URL is the same as console URL with /api appended at the end. For example, http://HOSTNAME:8080/api . When Backendless Pro is running, you can confirm that the API endpoint is working, by entering it in a browser. You should see the following (or similar) response:
    api-endpoint-response

Follow the steps below to build your first app with Backendless:

  1. Login to Backendless Console. The username and password are what you entered during the installation process. If you cannot remember the login, click the Register link on the Backendless Console login screen and create a new developer account.
  2. Select or create an app. If you do not have any applications in your account, you will be prompted to create one.
  3. Click the Download Project Template button:
    download-project-template-new-location.zoom80
  4. Double click the JavaScript icon, then double-click the HTML-JS icon to download a project for JS:
    html-js-project
  5. The downloaded ZIP contains an IntelliJ IDEA/WebStorm project, however, since the structure of the project is very straight-forward, you can open it with any IDE. For the sake of simplicity this guide assumes the project is opened with IntelliJ IDEA.
  6. The project contains an HTML and a JS file:
    js-project
  7. The HTML file imports the version 5 of the Backendless JS library:
    <script src="//api.backendless.com/sdk/js/latest/backendless.js"></script>
    

  8. The JS code located in the app.js file contain library initialization code (Backendless.initApp) as well as the code which stores an object in the database of your Backendless backend:
    var APP_ID = '6F70C24E-6B29-DD1D-FFA9-74BC15FE0900';
    var API_KEY = '479F3EA2-87F6-DF1C-FF3A-86EA4B1D4F00';
    
    Backendless.initApp(APP_ID, API_KEY);
    
    Backendless.Data.of( "TestTable" ).save( { foo:"bar" } )
        .then( function( obj ) {
            console.log( "object saved. objectId " + obj.objectId )
        } )
        .catch( function( error ) {
            console.log( "got error - " + error )
        })
    

  9. The code is ready to run without any changes. When you open the HTML file in a browser (make sure the file is loaded from a web server), you will see the following output in the browser's console window:
    running-js-project
  10. To verify the object in Backendless, return to Backendless Console, and click the Data icon. The TestTable table shows the persisted object:
    saved-object.zoom50