In this post we start with a collection we created by importing a CSV file, FFD.csv.
We now create a Server Side script to access this collection.
In the appery.io platform click on Server Code tab to open the user interface as shown. In the script editor there may be some default code. Remove this script.
From the Snippets side click and add Retrieve all Objects. This inserts a line of code into the editor as shown below:
var result = Collection.query("dbId", "collectionName");
You need to insert correct values for the arguments. The JsonTest was the database in which the imported collection was saved. The imported CSV file was named as a collection with the name 'Custo'. The dbId parameter was found from the Settings tab for the JsonTest database
If the script is properly formulated you could Run the script. If there are errors you would see it in Trace info.
This inserts this code:
Modify this code as shown below:
Click Save and Run. You should the response to the script in the panel as show below.