• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LiveCode Server information
#1
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.
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
?>
  Reply


Messages In This Thread
LiveCode Server information - by jasonchan - 05-09-2019, 05:53 PM
RE: LiveCode Server information - by mark.h - 06-12-2019, 06:14 PM
RE: LiveCode Server information - by steveuba - 07-22-2020, 06:11 PM
RE: LiveCode Server information - by mark_talluto - 08-19-2020, 01:32 AM
RE: LiveCode Server information - by steveuba - 08-19-2020, 03:06 AM
RE: LiveCode Server information - by mark_talluto - 08-19-2020, 04:51 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)