This project implements a random number generator using the 0rbit platform and AO processes. It includes both backend processes and a frontend application.
- LuaRocks: A package manager for Lua modules
- Node.js and npm: JavaScript runtime and package manager
- LuaRocks: Follow the installation instructions on the LuaRocks website.
- Node.js and npm: Download and install from the official Node.js website.
- Backend Processes: Located in the
./ao/random_function
directory - Frontend Application: Located in the
./apps/frontend
directory
-
Set the wallet environment variable:
export WALLET_JSON="$(cat ~/.aos.json)"
-
Build the process:
cd ao/random_function && ./scripts/build.sh npm run random_function:build
-
Deploy the process:
npm run random_function:deploy
-
Inject the process in frontend:
npm run random_function:inject
-
Navigate to the frontend directory:
cd apps/frontend
-
Install dependencies:
npm i
-
Start the development server:
npm run dev
Make sure to fund your AO Process using 0rbit points on which the process is deployed.
For any issues or questions, please:
- Open an issue on the GitHub repository
- Ping us on Discord
You can also read the blog here.