update readme
This commit is contained in:
parent
f9941ed06a
commit
4207bbd538
2 changed files with 24 additions and 72 deletions
36
README.md
36
README.md
|
@ -1,31 +1,26 @@
|
||||||
# nixin-farm
|
#NixiN Farm Loco POC
|
||||||
|
This project is an experiment to evaluate the [loco-rs framework](https://loco.rs/docs))
|
||||||
NixiN Farm Loco POC
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Dev environment
|
## Dev environment
|
||||||
## Install Rust
|
## Install Rust
|
||||||
If you are on NixOS, there is a shell.nix at the root of the project. You just have to run `nix-shell` to get a rust environment
|
If you are on NixOS, there is a shell.nix at the root of the project. You just have to run `nix-shell` to get a rust environment
|
||||||
Otherwize, go to https://www.rust-lang.org/tools/install for instructions to install Rust
|
Otherwize, go to https://www.rust-lang.org/tools/install for instructions to install Rust
|
||||||
You will also need open ssl development library (`apt install libssl-dev` on debian/ubuntu)
|
You will also need open ssl development library (`apt install libssl-dev` on debian/ubuntu)
|
||||||
|
|
||||||
# Install Loco
|
# Install Loco
|
||||||
```sh
|
```sh
|
||||||
$ cargo install loco-cli
|
$ cargo install loco-cli
|
||||||
$ cargo install sea-orm-cli
|
$ cargo install sea-orm-cli
|
||||||
```
|
```
|
||||||
|
# Run a sub project for test/debug
|
||||||
# Update loco
|
change directory to the subproject and run it using `cargo loco start`. For exemple :
|
||||||
Use `cargo interactive-update` to update all dependencies. Do not forget to also do it inside the migration sub folder
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ cargo install cargo-interactive-update
|
$ cd nixin_farm_ssr
|
||||||
$ cargo interactive-update
|
$ cargo loco start
|
||||||
$ cd migration
|
|
||||||
$ cargo interactive-update
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Test / Debug
|
# Test / Debug
|
||||||
|
To test the app with a web browser point it to http://localhost:5150
|
||||||
|
|
||||||
To register a user from the command line :
|
To register a user from the command line :
|
||||||
```sh
|
```sh
|
||||||
curl --location 'localhost:5150/api/auth/register'
|
curl --location 'localhost:5150/api/auth/register'
|
||||||
|
@ -47,3 +42,16 @@ curl --location 'localhost:5150/api/auth/login' \
|
||||||
}'
|
}'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Update loco
|
||||||
|
To update loco-rs Use `cargo interactive-update` to update all dependencies. Do not forget to also do it inside the migration sub folder
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ # install cargo-interactive-update if it is not already installed
|
||||||
|
$ cargo install cargo-interactive-update
|
||||||
|
$ # then launch it (from a sub project directory)
|
||||||
|
$ cargo interactive-update
|
||||||
|
$ # select all the available updates in the TUI and apply them
|
||||||
|
$ # then go to the migration sub folder and do the same
|
||||||
|
$ cd migration
|
||||||
|
$ cargo interactive-update
|
||||||
|
```
|
||||||
|
|
|
@ -1,58 +1,2 @@
|
||||||
# Welcome to Loco :train:
|
# NixiN loco POC with htmx
|
||||||
|
Test application using htms server side rendering
|
||||||
[Loco](https://loco.rs) is a web and API framework running on Rust.
|
|
||||||
|
|
||||||
This is the **SaaS starter** which includes a `User` model and authentication based on JWT.
|
|
||||||
It also include configuration sections that help you pick either a frontend or a server-side template set up for your fullstack server.
|
|
||||||
|
|
||||||
|
|
||||||
## Quick Start
|
|
||||||
|
|
||||||
```sh
|
|
||||||
cargo loco start
|
|
||||||
```
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ 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
|
|
||||||
|
|
||||||
▄ ▀
|
|
||||||
▀ ▄
|
|
||||||
▄ ▀ ▄ ▄ ▄▀
|
|
||||||
▄ ▀▄▄
|
|
||||||
▄ ▀ ▀ ▀▄▀█▄
|
|
||||||
▀█▄
|
|
||||||
▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄ ▀▀█
|
|
||||||
██████ █████ ███ █████ ███ █████ ███ ▀█
|
|
||||||
██████ █████ ███ █████ ▀▀▀ █████ ███ ▄█▄
|
|
||||||
██████ █████ ███ █████ █████ ███ ████▄
|
|
||||||
██████ █████ ███ █████ ▄▄▄ █████ ███ █████
|
|
||||||
██████ █████ ███ ████ ███ █████ ███ ████▀
|
|
||||||
▀▀▀██▄ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀ ██▀
|
|
||||||
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
|
|
||||||
https://loco.rs
|
|
||||||
|
|
||||||
environment: development
|
|
||||||
database: automigrate
|
|
||||||
logger: debug
|
|
||||||
compilation: debug
|
|
||||||
modes: server
|
|
||||||
|
|
||||||
listening on http://localhost:5150
|
|
||||||
```
|
|
||||||
|
|
||||||
## Full Stack Serving
|
|
||||||
|
|
||||||
You can check your [configuration](config/development.yaml) to pick either frontend setup or server-side rendered template, and activate the relevant configuration sections.
|
|
||||||
|
|
||||||
|
|
||||||
## Getting help
|
|
||||||
|
|
||||||
Check out [a quick tour](https://loco.rs/docs/getting-started/tour/) or [the complete guide](https://loco.rs/docs/getting-started/guide/).
|
|
||||||
|
|
Loading…
Reference in a new issue