05-09-2019, 05:53 PM
Some of you have asked about LiveCloud with LiveCode Server.
Here is how you can set it up.
We are not using this currently so we are not sure about the limitation nor the performance.
Please feel free to share your experience here for the community.
We will love to hear any new tricks you discover integrating LiveCloud with LiveCode Server or new methods connecting LiveCloud and web server.
Requirements:
The LC server needs to be on a Linux system.
The LC server needs to be on indy/professional license. It will not work with community.
You need to include externals "mergJSON" and "tsNet". You can do this by adding "mergJSON-x64.so" and "tsNet-x64.so" to the LiveCode Server externals folder.
Make a file named "cdb.lc" and paste the below code in it. Don't forget to change the authKey to your authKey. You can find it in your LCM.
You will also need to put 'require "cdb.lc"' into your other .lc files that need to access database.
Here is how you can set it up.
We are not using this currently so we are not sure about the limitation nor the performance.
Please feel free to share your experience here for the community.
We will love to hear any new tricks you discover integrating LiveCloud with LiveCode Server or new methods connecting LiveCloud and web server.
Requirements:
The LC server needs to be on a Linux system.
The LC server needs to be on indy/professional license. It will not work with community.
You need to include externals "mergJSON" and "tsNet". You can do this by adding "mergJSON-x64.so" and "tsNet-x64.so" to the LiveCode Server externals folder.
Make a file named "cdb.lc" and paste the below code in it. Don't forget to change the authKey to your authKey. You can find it in your LCM.
You will also need to put 'require "cdb.lc"' into your other .lc files that need to access database.
Code:
<?lc
global gCDBAuthKey
--Code to startup cassiaDB
wait 0 milliseconds with messages
#####
#####PUT YOUR AUTH KEY HERE (FOUND IN THE INITIALIZATION SCRIPT)
put "802dfa0ef7cc4514b5142a98914e4b66" into gCDBAuthKey
#####
#####
put "<br><br>starting loading CanelaDB...<br>"
put $_Server["PATH_TRANSLATED"] into tServerPath
set itemdel to slash
delete item -1 of tServerPath
try
put "/CanelaDB/libraries" after tServerPath
start using stack (tServerPath & "/CDB_Header.lib")
start using stack (tServerPath & "/CDB_Starter.lib")
catch tError
put "<br> CanelaDB could not be loaded. Error: <br>"& tError & "<br><br>"
exit to top
end try
put cdb_auth("user@email.com","yourpasswordgoeshere","user") #NEEDED FOR "CLOUD" DATA
cdb_loadTable
?>