Installation
Getting started with Lua on Beans is easy. Since it's built on Redbean, there are no complex dependencies to manage.
Prerequisites
A Unix-like operating system (Linux, macOS, BSD)
Node.js and npm installed for the beans-cli tool
Step-by-Step Setup
Install luaonbeans-cli
Install the Lua on Beans CLI tool globally via npm:
$ npm i -g luaonbeans-cli
This will install the beans command globally, making it available from anywhere in your terminal.
Create a New Project
Use the beans CLI to create a new application:
$ beans new demoapp
$ cd demoapp
$ npm i
This will create a new directory demoapp with the complete project structure including:
-
folder
app/- Controllers, models, and views -
folder
config/- Routes and configuration -
folder
public/- Static assets
Start the Development Server
Start the development server with live reload:
$ beans dev
Success!
Visit http://localhost:8080 in your browser to see your new application running!
The dev server runs on port 8080 with a WebSocket on port 8081 for live reload functionality.
Next Steps
Now that you have Lua on Beans installed, learn how to: