Expand description
§Starting A New Project
To start a new project, you can use cargo-generate:
cargo install loco-cli
❯ loco new
✔ ❯ App name? · myapp
? ❯ What would you like to build? ›
❯ lightweight-service (minimal, only controllers and views)
Rest API (with DB and user auth)
Saas app (with DB and user auth)§Available Features
To avoid compiling unused dependencies, loco gates certain features.
| Feature | Default | Description |
|---|---|---|
auth_jwt | true | Enable user authentication. |
cli | true | Expose Cli commands. |
| `testing | false | Test Utilities Module. |
with-db | true | with-db. |
channels | false | Enable socket channels. |
Re-exports§
Modules§
- app
- This module contains the core components and traits for building a web server application.
- auth
- boot
- Application Bootstrapping and Logic
- cli
- command-line interface for running various tasks and commands related to the application. It allows developers to interact with the application via the command line.
- concern
- config
- Configuration Management
- controller
- Manage web server routing
- db
- Database Operations
- doctor
- environment
- Defines the application environment. By given the environment you can also load the application configuration
- errors
- Application Error Handling
- hash
- mailer
- This module defines the email-related functionality, including the
Mailertrait and its implementation,Emailstructure, and theMailerWorkerfor asynchronous email processing. - model
- Model Error Handling
- prelude
- schema
- Database Table Schema Helpers
- task
- Task Management Module
- validation
- This module provides utility functions for handling validation errors for structs. It useful if you want to validate model before inset to Database.
- worker
Type Aliases§
- Result
- Application results options list