Aos
.load
This feature allows you to load lua code from a source file on your local machine, this simple feature gives you a nice DX experience for working with aos processes.
When creating handlers you may have a lot of code and you want to take advantage of a rich development environment like vscode. You can even install the lua extension to get some syntax checking.
So how do you publish your local lua source code to your ao process? This is where the .load
command comes into play.
hello.lua
Handlers.add(
"ping",
Handlers.utils.hasMatchingData("ping"),
Handlers.utils.reply("pong")
)
aos shell
.load hello.lua
Easy Peasy! 🐶