LiveCloud Forums
LiveCode Server information - Printable Version

+- LiveCloud Forums (https://forums.livecloud.io)
+-- Forum: General (https://forums.livecloud.io/forumdisplay.php?fid=1)
+--- Forum: Announcements (https://forums.livecloud.io/forumdisplay.php?fid=2)
+--- Thread: LiveCode Server information (/showthread.php?tid=16)



LiveCode Server information - jasonchan - 05-09-2019

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
?>



RE: LiveCode Server information - mark.h - 06-12-2019

You can set this up on a hosted provider (either HostM or onRev ) by:
1.) Once you've created an account with HostM or onRev, you will need to get them to put you on the commercial version of LC Server (you should be able to email their support team to do this).
2.) You will need them to add the TSNET and MergJSON externals. I think their support teams can help you with this as well, or perhaps there is a folder in your installation where you can drop externals in.
3.) Copy your CanelaDB folder (exported from LCM), and paste it into your Public_HTML directory (Whatever would correspond to "/" in your website).
4.) Create the "cdb.lc" file from the sample code above, making sure to replace the authkey with your authkey (found in the LCM initialization script). You can save this into your Public_HTML directory as well.
5.) In any of your .lc scripts that require database access, you should 
Code:
<?lc require "cdb.lc" ?>

 at the top of the file.
6.) You can check to see this is working with the following script:
Code:
<?lc
require "cdb.lc"
?>
<html>
<head>Testing CanelaDB</head>
<body>
<?lc
put cdb_tableNames()
?>
</body>
</html>



RE: LiveCode Server information - steveuba - 07-22-2020

(06-12-2019, 06:14 PM)mark.h Wrote: You can set this up on a hosted provider (either HostM or onRev ) by:
1.) Once you've created an account with HostM or onRev, you will need to get them to put you on the commercial version of LC Server (you should be able to email their support team to do this).
2.) You will need them to add the TSNET and MergJSON externals. I think their support teams can help you with this as well, or perhaps there is a folder in your installation where you can drop externals in.
3.) Copy your CanelaDB folder (exported from LCM), and paste it into your Public_HTML directory (Whatever would correspond to "/" in your website).
4.) Create the "cdb.lc" file from the sample code above, making sure to replace the authkey with your authkey (found in the LCM initialization script). You can save this into your Public_HTML directory as well.
5.) In any of your .lc scripts that require database access, you should 
Code:
<?lc require "cdb.lc" ?>

 at the top of the file.
6.) You can check to see this is working with the following script:
Code:
<?lc
require "cdb.lc"
?>
<html>
<head>Testing CanelaDB</head>
<body>
<?lc
put cdb_tableNames()
?>
</body>
</html>

Hello @jason, trust you guys at Canela are staying safe and doing good.

I have recently revisited getting LiveCloud to work on the Web -- via LiveCode Server -- hence resuscitating this thread. I have followed the steps provided here, and the old one you provided to me a while ago when we touched base on this, but I'm still not able to get LiveCloud to instantiate properly. I've tried everything that I can think of from the LiveCode angle, as well as LiveCloud but this is still one tough nut to crack Smile Dodgy No matter, I am now very determined to get this working because of the value it offers compared to the other NoSQLs I've tried in recent time.

My very recent work, using hostM and running a commercially licensed copy of LiveCode Server, I continually get the following error;


Code:
starting loading CanelaDB...

stack "/home/ua830318/public_html/edu.ezektec.com/EzekTecEdu/v1/CanelaDB/libraries/CDB_Starter.lib"
 row 14725, col 1: Handler: can't find handler (revDeleteFolder)
 row 14725, col 1: switch: error in statement
 row 14721, col 1: Handler: error in statement (csi_deleteFolder)
 row 14263, col 61: Function: error in function handler (csi_deleteFolder)
 row 14263, col 61: get: error in expression
 row 14263, col 61: if-then: error in statement
 row 14263, col 61: repeat: error in statement
 row 14263, col 61: if-then: error in statement
 row 14200, col 1: Handler: error in statement (csi_saveRAMToDisk)
 row 4087, col 43: Handler: can't find handler (csi_saveRAMToDisk)
 row 4087, col 43: if-then: error in statement
 row 4087, col 43: repeat: error in statement
 row 4065, col 1: Handler: error in statement (cdb_batchDeleteLocal)
 row 4002, col 1: Handler: can't find handler (cdb_batchDeleteLocal)
 row 4002, col 1: Handler: error in statement (cdb_deleteLocal)
 row 3950, col 1: Handler: can't find handler (cdb_deleteLocal)
 row 3950, col 1: switch: error in statement
 row 3948, col 1: Handler: error in statement (cdbi_delete)
stack "/home/ua830318/public_html/edu.ezektec.com/EzekTecEdu/v1/CanelaDB/libraries/CDB_Header.lib"
 row 71, col 1: Handler: can't find handler (cdbi_delete)
 row 71, col 1: Handler: error in statement (cdb_delete)
stack "/home/ua830318/public_html/edu.ezektec.com/EzekTecEdu/v1/CanelaDB/libraries/CDB_Starter.lib"
 row 15941, col 1: Handler: can't find handler (cdb_delete)
 row 15941, col 1: if-then: error in statement
 row 15941, col 1: if-then: error in statement
 row 15941, col 1: repeat: error in statement
 row 15846, col 1: Handler: error in statement (csi_uploadRequest)
 row 15754, col 1: Handler: can't find handler (csi_uploadRequest)
 row 15754, col 1: Handler: error in statement (csi_flushCache)
 row 14104, col 1: Handler: can't find handler (csi_flushCache)
 row 14104, col 1: if-then: error in statement
 row 14100, col 1: Handler: error in statement (_csi_sendPackage)
 row 14052, col 18: Function: error in function handler (_csi_sendPackage)
 row 14052, col 18: Operators not: error in right operand
 row 14052, col 18: if-then: error in condition expression
 row 14052, col 18: if-then: error in condition expression
 row 14052, col 18: if-then: error in statement
 row 14010, col 1: Handler: error in statement (csi_sendPackageToServer)
 row 1270, col 1: Handler: can't find handler (csi_sendPackageToServer)
 row 1270, col 1: Handler: error in statement (cdb_requestNonceValue)
 row 1151, col 10: Function: error in function handler (cdb_requestNonceValue)
 row 1151, col 10: put: error in expression
 row 1151, col 1: Handler: error in statement (cdbi_auth)
stack "/home/ua830318/public_html/edu.ezektec.com/EzekTecEdu/v1/CanelaDB/libraries/CDB_Header.lib"
 row 165, col 10: Function: error in function handler (cdbi_auth)
 row 165, col 10: get: error in expression
 row 165, col 1: Handler: error in statement (cdb_auth)
file "/home/ua830318/public_html/edu.ezektec.com/EzekTecEdu/v1/lcServerVersion.lc"
 row 29, col 5: Function: error in function handler (cdb_auth)
 row 29, col 5: put: error in expression
file "/home/ua830318/public_html/edu.ezektec.com/EzekTecEdu/v1/cdb.lc"


Not to over-flog my perceived value of LiveCloud, but I do believe that a REST api for LiveCloud is a critical missing piece that can see LiveCloud begin to gain interest within the other mainstream/popular programming languages. I still dream of leveraging the power of LiveCloud in my web-based application built using HTML, LiveCode Server, Python, RUST, etc.

Needed to get that off my chest..Lol, back to the topic at hand, any tip on how to solve the above challenge will help me in my goal of getting closer to rolling a LiveCode Server LiveCloud REST api Cool

Will look out for replies.

Thank you


RE: LiveCode Server information - mark_talluto - 08-19-2020

Hi Stephen,

We believe that having a REST API for LiveCloud would open the technology up to more developers. Our team is working hard on some new technology (Appli) that will make working with databases even more accessible than it is now. We believe this will be a game-changer for those that make business apps. Our focus on this technology leaves us with less time to build out some of the great plans we have to improve LiveCloud.

LiveCloud is in a stable place right now. Its purpose of specifically helping LiveCode developers has been achieved. We have been releasing a consistent amount of features and bug fixes to the service. Please hang in there as we take our technology to a new level. We are working hard to get a general release out in the coming months.


RE: LiveCode Server information - steveuba - 08-19-2020

(08-19-2020, 01:32 AM)mark_talluto Wrote: Hi Stephen,

We believe that having a REST API for LiveCloud would open the technology up to more developers. Our team is working hard on some new technology (Appli) that will make working with databases even more accessible than it is now. We believe this will be a game-changer for those that make business apps. Our focus on this technology leaves us with less time to build out some of the great plans we have to improve LiveCloud.

LiveCloud is in a stable place right now. Its purpose of specifically helping LiveCode developers has been achieved. We have been releasing a consistent amount of features and bug fixes to the service. Please hang in there as we take our technology to a new level. We are working hard to get a general release out in the coming months.

Hello Mark,

Thank you for your response and the insight into things you and team have in the pipeline. I've always had faith in LiveCloud and will be waiting patiently while cheering you and team on.

I've heard about "Appli" -- found an old conference stack but not able to get it to work for some reason (it crashes on me every time I run it). If it's still open for testing, do you mind pointing me in the right direction to give it another go?

Thanks again and wishing you and team the very best.


RE: LiveCode Server information - mark_talluto - 08-19-2020

Hi Steven. The version we released has been deprecated. Our progress has moved us far beyond what we showed at the conference.

We will have a closed beta as soon as we complete two more milestones. We are working for a fall preview.

I appreciate your patience while we work through all of this.