JS files in #/API Last updated: 07. Jan 2023
.JS file placed in the API folder will run on the server and always return JSON. You can only use them in your #/API folder, where you can write dynamic API functions to make use of in your web apps with AJAX (JSON).
Example #/API/.JS file
Server side JS files are only used in your #/API folder. And are primarely used to write WEB API functions returning JSON.
#/API/GetApartments.js
/* Get list of files in the apartments folder */
var apartments = docly.listFiles("#/Apartments");
/* Simply return the result and it will be converted to JSON, so the front end
** can use the data to generate a dynamic list */
return files;