Files
Notes/notes-service/vendor/loco-rs/snipdoc.yml
T
2026-08-01 16:11:49 +03:00

143 lines
5.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
snippets:
description:
content: 🚂 Loco is Rust on Rails.
path: ./snipdoc.yml
help-command:
content: cargo loco --help
path: ./snipdoc.yml
exec-help-command:
content: cd ./examples/demo && cargo loco --help
path: ./snipdoc.yml
build-command:
content: cargo build --release
path: ./snipdoc.yml
quick-installation-command:
content: |-
cargo install loco
cargo install sea-orm-cli # Only when DB is needed
path: ./snipdoc.yml
loco-cli-new-from-template:
content: |-
loco new
App name? · myapp
What would you like to build? · Saas App with client side rendering
Select a DB Provider · Sqlite
Select your background worker type · Async (in-process tokio async tasks)
🚂 Loco app generated successfully in:
myapp/
- assets: You've selected `clientside` for your asset serving configuration.
Next step, build your frontend:
$ cd frontend/
$ npm install && npm run build
path: ./snipdoc.yml
postgres-run-docker-command:
content: |-
docker run -d -p 5432:5432 \
-e POSTGRES_USER=loco \
-e POSTGRES_DB=myapp_development \
-e POSTGRES_PASSWORD="loco" \
postgres:15.3-alpine
path: ./snipdoc.yml
redis-run-docker-command:
content: docker run -p 6379:6379 -d redis redis-server
path: ./snipdoc.yml
starting-the-server-command:
content: cargo loco start
path: ./snipdoc.yml
starting-the-server-command-with-environment-env-var:
content: LOCO_ENV=qa cargo loco start
path: ./snipdoc.yml
starting-the-server-command-with-output:
content: |-
$ cargo loco start
▄ ▀
▀ ▄
▄ ▀ ▄ ▄ ▄▀
▄ ▀▄▄
▄ ▀ ▀ ▀▄▀█▄
▀█▄
▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▀▀█
██████ █████ ███ █████ ███ █████ ███ ▀█
██████ █████ ███ █████ ▀▀▀ █████ ███ ▄█▄
██████ █████ ███ █████ █████ ███ ████▄
██████ █████ ███ █████ ▄▄▄ █████ ███ █████
██████ █████ ███ ████ ███ █████ ███ ████▀
▀▀▀██▄ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ██▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
https://loco.rs
listening on port 5150
path: ./snipdoc.yml
doctor-command:
content: |-
$ cargo loco doctor
Finished dev [unoptimized + debuginfo] target(s) in 0.32s
Running `target/debug/myapp-cli doctor`
✅ SeaORM CLI is installed
✅ DB connection: success
✅ Redis connection: success
path: ./snipdoc.yml
generate-deployment-command:
content: |-
cargo loco generate deployment docker
added: "Dockerfile"
added: ".dockerignore"
* Dockerfile generated successfully.
* Dockerignore generated successfully
path: ./snipdoc.yml
scaffold-help-command:
content: cd ./examples/demo && cargo loco generate scaffold --help
path: ./snipdoc.yml
scaffold-post-command:
content: cargo loco generate scaffold posts
name:string title:string content:text --api
path: ./snipdoc.yml
generate-task-help-command:
content: cd ./examples/demo && cargo loco generate task --help
path: ./snipdoc.yml
run-task-command:
content: cargo loco task <TASK_NAME>
path: ./snipdoc.yml
list-tasks-command:
content: cargo loco task
path: ./snipdoc.yml
migrate-down-command:
content: cargo loco db down
path: ./snipdoc.yml
migrate-down-n-command:
content: cargo loco db down 2
path: ./snipdoc.yml
scheduler-generate-command:
content: cargo loco generate scheduler
path: ./snipdoc.yml
scheduler-list-command:
content: cargo loco scheduler --list
path: ./snipdoc.yml
scheduler-list-from-file-command:
content: cargo loco scheduler --config config/scheduler.yaml --list
path: ./snipdoc.yml
scheduler-list-from-env-setting-command:
content: LOCO_ENV=production cargo loco scheduler --list
path: ./snipdoc.yml
scheduler-run-job-by-name-command:
content: LOCO_ENV=production cargo loco scheduler --name 'JOB_NAME'
path: ./snipdoc.yml
scheduler-run-job-by-tag-command:
content: LOCO_ENV=production cargo loco scheduler --tag 'maintenance'
path: ./snipdoc.yml
cli-middleware-list:
content: cargo loco middleware --config
path: ./snipdoc.yml
jobs-help-command:
content: cd ./examples/demo && cargo loco jobs --help
path: ./snipdoc.yml
seed-help-command:
content: cd ./examples/demo && cargo loco db seed --help
path: ./snipdoc.yml