NixiN Farm Loco POC
Find a file
2024-10-22 14:03:51 +02:00
nixin_farm_ssr add custom authentification middleware 2024-10-22 13:53:58 +02:00
.gitignore add custom authentification middleware 2024-10-22 13:53:58 +02:00
LICENSE Initial commit 2024-10-16 17:22:24 +00:00
README.md update readme 2024-10-22 14:03:51 +02:00
rust-toolchain.toml Add nix-shell dev environment and update readme 2024-10-16 19:46:19 +02:00
shell.nix Add nix-shell dev environment and update readme 2024-10-16 19:46:19 +02:00

nixin-farm

NixiN Farm Loco POC

Dev environment

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 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)

Install Loco

$ cargo install loco-cli
$ cargo install sea-orm-cli

Update loco

Use cargo interactive-update to update all dependencies. Do not forget to also do it inside the migration sub folder

$ cargo install cargo-interactive-update
$ cargo interactive-update
$ cd migration
$ cargo interactive-update

Test / Debug

To register a user from the command line :

curl --location 'localhost:5150/api/auth/register'
     --header 'Content-Type: application/json'
     --data-raw '{
         "name": "test",
         "email": "test@nixin.local",
         "password": "Test"
     }'

To test user login from the command line :

curl --location 'localhost:5150/api/auth/login' \
     --header 'Content-Type: application/json' \
     --data-raw '{
         "email": "test@nixin.local",
         "password": "Test"
     }'