This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Copas - TCP status and Control
#5
You can't use copas or any long-running code from the web server context directly. For app daemons use this code:
Code:
require('apps.daemon').stop('myappname')
require('apps.daemon').start('myappname')

To handle user actions either use a separate .lp file that is called remotely using fetch() or $.get(). Or create a form and use getvar() in the .lp file to check whether a certain parameter has been passed or not. Check this sample app: https://forum.logicmachine.net/showthrea...5#pid33575
Reply


Messages In This Thread
Copas - TCP status and Control - by Diggerz - 17.05.2024, 22:08
RE: Copas - TCP status and Control - by admin - 20.05.2024, 07:24
RE: Copas - TCP status and Control - by admin - 15.07.2024, 06:30
RE: Copas - TCP status and Control - by admin - 15.07.2024, 10:57

Forum Jump: