This app was:
This project depend on the following tools. Please install them as needed.
- Rust
- Nightly Rust
- Run
rustup toolchain install nightly
- Run
rustup target add wasm32-unknown-unknown
- Run
- Cargo Make
- Run
cargo install --force cargo-make
- Run
- Command Line Interface (CLI) for
wasm-bindgen
- Run
cargo install -f wasm-bindgen-cli
- Run
- CLI for
stylance
- Run
cargo install stylance-cli
- Run
- "Just" Command runner
- Run
cargo install just
- Run
- Node.js
- PostCSS
- Run
npm install -g postcss-cli
npm install -g <REQUIRED_PLUGIN_NAME>
, where the necessary plug-ins are:postcss-mixins
,autoprefixer
,postcss-selector-matches
,postcss-selector-not
,postcss-custom-media
,postcss-media-minmax
,postcss-nesting
,postcss-custom-selectors
- Run
Call just dev
My setup includes NGINX to handle multiple domains, where specifically www.solweo.tech is proxied to a port raised by Leptos.
Call just serve
to serve it at site-addr
(Look into leptos' metadata at Cargo.toml
) in release mode.
If you're curious about my particular set-up, see below.
Configuration file at /etc/nginx/conf.d/solweo.tech.conf
:
server {
listen *:80 default_server;
listen [::]:80 default_server;
server_name solweo.tech www.solweo.tech;
location / {
proxy_pass http://{site-addr}; # Ex: `127.0.0.1:3000`
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Launching system service via systemctl start nginx
.
System's service configuration file at /etc/systemd/system/my-site.service
:
[Unit]
Description=Personal website service
After=multi-user.target
[Service]
Type=simple
Restart=always
WorkingDirectory=/var/www/solweo.tech/
ExecStart=just serve
[Install]
WantedBy=multi-user.target
And towards the end there are only 3 steps:
- Updating system daemon:
sudo systemctl daemon-reload
; - Enabling service:
systemctl enable my-site.service
; - Starting service:
systemctl start my-site.service
.