Skip to content

Teal Typed Template

This template provides a starting point for building applications with Teal, a typed dialect of Lua. Teal combines the simplicity and performance of Lua with static typing, offering improved code safety and tooling support. It compiles directly to Lua, allowing seamless integration with existing Lua codebases and libraries. This template includes a basic Teal process demonstrating counter functionality, showcasing how to leverage Teal's features in an AO environment.

lua frontend

Features

This starter template comes with a simple Teal Counter process. It includes a basic Teal process that increments a counter and returns the current count.

How to build, deploy and run

Install dependencies

npm install
npm i -g https://get_ao.g8way.io

After installation, simply run:

aos

This will setup a new keyfile for you, and then you can export it as an environment variable

export WALLET_JSON="$(cat ~/.aos.json)"

More information can be found here

Build the Lua process

chmod +x ./ao/process-name/scripts/build.sh
 
npm run process-name:build

Deploy the Lua process

chmod +x ./ao/process-name/scripts/deploy.sh
 
npm run process-name:deploy

Inject the process id into the frontend app

npm run process-name:inject

Run the frontend app

npm run frontend:dev