No description
Find a file
2025-12-17 15:11:49 +01:00
public personalized favicon 2025-12-16 20:33:07 +01:00
src optimized build with dockerignore 2025-12-17 14:30:07 +01:00
style Add footbar and polishing up some stuff 2025-02-14 00:35:10 +01:00
.dockerignore quick-fixes 2025-12-17 15:00:54 +01:00
.gitignore ignored .drone.yml 2025-12-16 23:32:06 +01:00
Cargo.lock optimized build with dockerignore 2025-12-17 14:30:07 +01:00
Cargo.toml quick-fixes 2025-12-17 15:00:54 +01:00
Dockerfile forked-ihate.tech to tablecloth 2025-12-11 16:12:18 +01:00
index.html fix logos and add two services 2025-02-14 22:54:36 +01:00
package-lock.json Add footbar and polishing up some stuff 2025-02-14 00:35:10 +01:00
package.json Add footbar and polishing up some stuff 2025-02-14 00:35:10 +01:00
README.md updated README 2025-12-17 15:11:49 +01:00
rust-toolchain.toml forked-ihate.tech to tablecloth 2025-12-11 16:12:18 +01:00
tailwind.config.js Add footbar and polishing up some stuff 2025-02-14 00:35:10 +01:00
Trunk.toml initial commit 2025-02-12 22:52:38 +01:00

Leptos Logo

Leptos Client-Side Rendered (CSR) App Starter Template

This is a template for use with the Leptos web framework using the Trunk tool to compile and serve your app in development.

depends

sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo --version

mind leading dot

. "$HOME/.cargo/env" 
sudo apt install build-essential pkg-config libssl-dev 

Creating your repo from the template

This template requires you to have cargo-generate and trunk installed. leptosfmt is optional but highly recommended. You can install them with

cargo install cargo-generate trunk leptosfmt

To set up your project with this template, run

cargo generate --git https://github.com/leptos-community/start-csr

to generate your new project, then

cd landing-page

to go to your newly created project.

By default, this template uses Rust nightly and requires that you've installed the wasm compilation target for your toolchain.

Sass and Tailwind are also supported by the Trunk build tool, but are optional additions: see here for more info on how to set those up with Trunk.

If you don't have Rust nightly, you can install it with

rustup toolchain install nightly --allow-downgrade

You can add the wasm compilation target to rust using

rustup target add wasm32-unknown-unknown

You can add the leptoaster using

cargo add leptoaster

0. Developing your Leptos CSR project

To develop your Leptos CSR project, running

trunk serve --port 3000 --open

Above will open your app in your default browser at http://localhost:3000.

Deploying your Leptos CSR project

To build a Leptos CSR app for release, use the command

trunk build --release

This will output the files necessary to run your app into the dist folder; you can then use any static site host to serve these files.

For further information about hosting Leptos CSR apps, please refer to the Leptos Book chapter on deployment available here.

1. build new docker image for specfic paltform/arch

DOCKER_BUILDKIT=1 docker buildx build --platform linux/arm64 -t local/landing-page --build-arg APP="landing-page" --build-arg APP_PORT="8080" .

2. export new image

docker image ls
docker save -o landing.tar local/landing-page:latest

3. move new image to server via ssh

scp /home/username/landing.tar username@ip-a:/home/username/

3.1 ssh into server

sudo mv landing.tar /home/docker/
sudo su - docker

3.2 remove, then import new image

docker stop landing-page
docker image ls
docker rmi <enter-image-ID>
docker load -i landing.tar
docker start landing-page