Skip to content

aaaorg/prsa

Repository files navigation

Welcome to Loco 🚋

Loco is a web and API framework running on Rust.

This is the SaaS starter which includes a User model and authentication based on JWT.

Generating models

cargo loco generate scaffold make name:string^ active:bool!
cargo loco generate scaffold model name:string^ driver:string! make:references active:bool!
cargo loco generate scaffold location name:string^ code:int^ ip_code:int^ active:bool!
cargo loco generate scaffold printer name:string^ ip:string^ port:int! model:references location:references active:bool!

Quick Start

You need:

  • A local postgres instance
  • A local Redis instance

Check out your development configuration.

To configure a database , please run a local postgres database with loco:loco and a db named [app name]_development.: docker run -d -p 5432:5432 -e POSTGRES_USER=loco -e POSTGRES_DB=[app name]_development -e POSTGRES_PASSWORD="loco" postgres:15.3-alpine

Now start your app:

$ cargo loco start
Finished dev [unoptimized + debuginfo] target(s) in 21.63s
    Running `target/debug/myapp start`

    :
    :
    :

controller/app_routes.rs:203: [Middleware] Adding log trace id

                      ▄     ▀
                                 ▀  ▄
                  ▄       ▀     ▄  ▄ ▄▀
                                    ▄ ▀▄▄
                        ▄     ▀    ▀  ▀▄▀█▄
                                          ▀█▄
▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▀▀█
 ██████  █████   ███ █████   ███ █████   ███ ▀█
 ██████  █████   ███ █████   ▀▀▀ █████   ███ ▄█▄
 ██████  █████   ███ █████       █████   ███ ████▄
 ██████  █████   ███ █████   ▄▄▄ █████   ███ █████
 ██████  █████   ███  ████   ███ █████   ███ ████▀
   ▀▀▀██▄ ▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀ ██▀
       ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

started on port 3000

Getting help

Check out a quick tour or the complete guide.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published