Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vazw/siamstr
siamstr.com Nostr Address Provider written in Rust.
https://github.com/vazw/siamstr
leptos nip-05 nip-07 nip-07-wasm nostr nostr-wasm rust sqlite sqlx wasm wasm-bindgen web webserver
Last synced: 2 months ago
JSON representation
siamstr.com Nostr Address Provider written in Rust.
- Host: GitHub
- URL: https://github.com/vazw/siamstr
- Owner: vazw
- License: mit
- Created: 2023-11-24T07:56:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-28T17:14:57.000Z (5 months ago)
- Last Synced: 2024-08-28T19:01:29.827Z (5 months ago)
- Topics: leptos, nip-05, nip-07, nip-07-wasm, nostr, nostr-wasm, rust, sqlite, sqlx, wasm, wasm-bindgen, web, webserver
- Language: Rust
- Homepage: https://siamstr.com
- Size: 393 KB
- Stars: 12
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Siamstr Nostr Address Provider
## Running project [![Rust](https://github.com/vazw/siamstr/actions/workflows/rust.yml/badge.svg)](https://github.com/vazw/siamstr/actions/workflows/rust.yml) [![Docker Image CI](https://github.com/vazw/siamstr/actions/workflows/docker-image.yml/badge.svg)](https://github.com/vazw/siamstr/actions/workflows/docker-image.yml)
### Rust Toolchain
You'll need to use the nightly Rust toolchain, and install the `wasm32-unknown-unknown` target as well as the Trunk and `cargo-leptos` tools:
```
rustup toolchain install nightly
rustup target add wasm32-unknown-unknown
cargo install trunk cargo-leptos
```### TailwindCSS
Install TailwindCSS with `npm install -D tailwindcss`
### Run
To run the project locally,
1. run `npx tailwindcss -i ./input.css -o ./style/output.css --watch` in a terminal - this will build `style/output.css` and automatically rebuild when a change is detected in `input.css`
1. `cargo leptos watch` in the project directory.
1. In in your browser, navigate to [http://localhost:8008/?](http://localhost:8008/?)## Executing a Server on a Remote Machine Without the Toolchain
After running a `cargo leptos build --release` the minimum files needed are:
1. The server binary located in `target/server/release`
2. The `site` directory and all files within located in `target/site`
- css files will be in the target/site too.
3. The `Dockerfile` and `docker-compose.yml` located in `docs/` directory
4. you may alreay set your domain-name dns pointing to your remote server IP AddressCopy these files to your remote server. The directory structure should be:
```text
siamstr
site/
Dockerfile
docker-compose.yml
users.json (optional)
database.db (auto-generated)
```you should have `certbot` `docker` `nginx` installed on your remote server if not:
Ubuntu
```sh
sudo apt install certbot nginx docker docker-compose
```Debian should follow the installtion process on docker [website](https://docs.docker.com/engine/install/debian/)
```sh
sudo apt install certbot nginx
```setting up certbot and nginx config:
```sh
sudo certbot certonly --nginx -d example.com
# sudo certbot certonly --nginx -d www.siamstr.com (optional)
```Copy `text` inside `nginx.config` and paste into `/etc/nginx/site-enabled/default` and restart nginx service
```sh
sudo systemctl restart nginx.service
```Then start docker compose:
```sh
docker compose up
```# แค่เนี้ย ง่าย ๆ เสร็จแล้ว