This channel uses the iguana.info module to return the build information for the Iguana instance it is running on. The information returned includes the operating system, CPU bit size and Iguana version.
This could be used for automatically logging/tracking the build versions of your servers, or changing code behaviour for different versions (i.e., Git repository features need version 6), etc. This example displays the result in a web page, however you can do whatever you like with the data – save to file or database etc.
Using the Code [top]
- Import the Iguana Info channel from the Builtin: Iguana Tools repository
- Experiment with the code to find out how it works
- Then add the module to your Translator project
- Copy the require statement from the channel and add it at the top of your script
Note: This module modifies the global namespace
- Adapt the code to your own requirements
iguana.info()to return a table containing the server version and build details
- Interactive scripting help is included for this module
This is the github code for the main module:
How it works [top]
The example is very basic, it uses the
iguana.info() function to retrieve the build data, then it concatenates it into a string and displays that string on a web page.
Note: The web page that is used is specified in the From HTTPS Source properties of the Channel.
You can do whatever you want with the data: Automatically log/track the build versions of your servers, or change code behaviour for different versions (i.e., Git repository features need version 6), display results in a web page, save the data to file or a database etc.
More information [top]
- Source code for the main module on github
- Source code for the iguana.info.lua module on github
- API documentation for net.http.respond