This is an application of Leptos web framework and the cargo-leptos Rust tool using Axum web server.
-
Installation of Nix package manager.
-
Clone the repo:
git clone https://github.com/rottegher/farmtasker-au
cd farmtasker-au
- Using direnv:
direnv allow
- Using just Nix:
nix develop . --impure
Wait for a while for nix to download the rust toolchain and all dependencies to then automatically enable the dev enviroment.
- Export your test Stripe API key to the dev environment:
export STRIPE_KEY "pk_test_***************************************************************************************************"
- Run and watch the application in dev mode:
cargo leptos watch
cargo leptos build --release
This will generate your server binary in target/release and your site package in target/site.
After running a cargo leptos build --release
the minimum files needed are:
- The server binary located in
target/server/release
- The
site
directory and all files within located intarget/site
- Stripe api key.
Copy these files to your remote server. The directory structure should be:
farmtasker-au
site/
Set the following environment variables (updating for your project as needed):
LEPTOS_OUTPUT_NAME="farmtasker-au"
LEPTOS_SITE_ROOT="site"
LEPTOS_SITE_PKG_DIR="pkg"
LEPTOS_SITE_ADDR="127.0.0.1:3000"
LEPTOS_RELOAD_PORT="3001"
STRIPE_KEY="...your key here..."
Finally, run the server binary.
./farmtasker-au
cargo leptos end-to-end
cargo leptos end-to-end --release
Cargo-leptos uses Playwright as the end-to-end test tool.
Tests are located in end2end/tests directory.
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
fartmasker.au a marketplace website for local farmers in Tasmania.
Copyright (C) 2024 Dmytro Serdiukov & FARMTASKER PTY LTD
This software is a free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
FARMTASKER PDY LTD, hereby disclaims all copyright interest in the
software `farmtasker.au' (a marketplace website for local farmers in Tasmania) written by Dmytro Serdiukov.
11 December 2024
Olesia Trukhanska, founder of FARMTASKER PTY LTD
You can contact us at [email protected]
See LICENSE
file or GNU LGPL.