Lua on Beans provides several CLI commands to help you manage your application. Here are some of the most commonly used commands:
# Create a new controller
beans create controller posts
# Create a new model
beans create model post
# Create a scaffold (controller, model, and views)
beans create scaffold posts
# Create a new migration
beans create migration add_indexes_to_posts
# Set up the database
beans db:setup
# Run pending migrations
beans db:migrate
# Rollback the last migration
beans db:rollback
# Run tests
beans specs
beans db:migrate
after creating a new migration or pulling changes that include new migrations.beans create scaffold
for rapid prototyping of new features.beans specs
regularly to ensure your changes haven't broken existing functionality.beans db:rollback
before making changes and re-running the migration.
# Start development mode with file watching
beans -w
beans -w
during development to automatically recompile assets when you make changes.