+
Skip to content

kai-natori/loco

 
 

Repository files navigation

Loco

🚂 Loco is Rust on Rails.

crate docs Discord channel

English · 中文

Loco

Loco is strongly inspired by Rails. If you know Rails and Rust, you'll feel at home. If you only know Rails and new to Rust, you'll find Loco refreshing. We do not assume you know Rails.

To get started quickly and see Loco in action, check out our casts video. It's a great way to familiarize yourself with the framework and see some of its key features in use.

Quick Start

cargo install loco-cli
cargo install sea-orm-cli # Only when DB is needed

Now you can create your new app (choose "SaaS app").

❯ loco new
✔ ❯ App name? · myapp
✔ ❯ What would you like to build? · SaaS app (with DB and user auth)

🚂 Loco app generated successfully in:
myapp

To configure a database , please run a local postgres database with loco:loco and a db named [insert app]_development.

docker run -d -p 5432:5432 \
  -e POSTGRES_USER=loco \
  -e POSTGRES_DB=myapp_development \
  -e POSTGRES_PASSWORD="loco" \
  postgres:15.3-alpine

A more advanced set of compose.yaml and Dockerfiles that include Redis and the mailtutan mailer are available for each starter on GitHub.

Now cd into your myapp and start your app:

$ cargo loco start

                      ▄     ▀
                                ▀  ▄
                  ▄       ▀     ▄  ▄ ▄▀
                                    ▄ ▀▄▄
                        ▄     ▀    ▀  ▀▄▀█▄
                                          ▀█▄
▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▀▀█
██████  █████   ███ █████   ███ █████   ███ ▀█
██████  █████   ███ █████   ▀▀▀ █████   ███ ▄█▄
██████  █████   ███ █████       █████   ███ ████▄
██████  █████   ███ █████   ▄▄▄ █████   ███ █████
██████  █████   ███  ████   ███ █████   ███ ████▀
  ▀▀▀██▄ ▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀ ██▀
      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                https://loco.rs

listening on port 5150

Project Status

  • Stateless APIs
  • Complete SaaS products with user authentication
  • Purpose-built services such as ML inference endpoints
  • Full stack projects with separate frontend project integrated with Loco
  • Hobby projects full-stack with backend and HTML frontend

Powered by Loco

  • SpectralOps - various services powered by Loco framework
  • Nativish - app backend powered by Loco framework

Contributors ✨

Thanks goes to these wonderful people:

About

🚂 🦀 The one-person framework for Rust for side-projects and startups

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载