WEBSTAT Library
The WEBSTAT library provides a simple method to quickly configure a component to act as a web server. It is used in the From HTTP to configure the component to use the provided HTTP port and SSL settings and display the corresponding url in the component status. It allows you to either use a custom SSL certificate and private key or default to the Iguana web server certificate and private key.
Add the library to the Translator project using +LIBRARY and try the below code snippet in your Translator:
-- Initialize listening for web requests
if Data == "INIT" then
WEBSTARTserver{
port = 7777,
use_https = true,
certificate = "Use Iguana's SSL certificate",
private_key = "Use Iguana's private key"
}
return
end