Oracle Backend for Parse Platform
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Extra Parse Test Code

Extra Parse Test Code

To test the Parse API direct access from the same page, let’s add a few lines of codes to the index.html file to show four new buttons to Insert, Get and Update a restaurant (minimum properties) in the same collection created from the Firebase-on-Parse SDK. The application logic is in the /parsef/example.js file.

  • The modified parts included in the index.html file are the following:

    <div style="text-align: center">
    <button id="insertButton">INSERT RESTAURANT</button><p>
    <button id="createButton">GET RESTAURANT</button><p>
    <button id="updateButton">SET RESTAURANT</button><p>
    <button id="queryButton" >N° RESTAURANTS</button>
    <script src="/__/firebase/9.6.6/firebase-app-compat.js"></script>
    <script src="/__/firebase/9.6.6/firebase-auth-compat.js"></script>
    <script src="/__/firebase/9.6.6/firebase-firestore-compat.js"></script> 
    <script src="/__/firebase/init.js"></script>
    <script src="//"></script>
    <!--ORACLE  -->
    <script src="/parsef/parsef.js"></script>
    <script src=""></script> 
    Parse.serverURL = "http://localhost:1337/parse";
    <script src="/parsef/example.js"></script>
    <!-- ORACLE-->
  • Reload the page to view the four new buttons. Running in the background are the Parse JS API calls for Insert, Get and Update, and the Firebase API to count how many restaurants are in the Parse database. For example:


  • Click in sequence:

    • Insert Restaurant:


    • Get Restaurant (Note: only Name and Category have been added):


    • Set Restaurant:


    • Get Restaurant (note that the additional field city has been added):


  • If you click on N° Restaurants, you get the size of the restaurants based on a Firebase API call.

Next, go to the Implemented APIs page to learn more.