ASTERALua API documentation
Back to productRU

Storage and modules

local counter = astera.storage.get("counter") or 0
astera.storage.set("counter", counter + 1)
astera.storage.remove("counter")

Values are stored in a private JSON file selected by the package id.

require searches for .lua modules in the active package directory first, then in the shared lua/modules directory. Several scripts can therefore share the same source module without duplicating it.