Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pakalpa/tauri-dynamic-update-server

A Simple Dynamic Update Server for Tauri Based Applications written in Rust + Rocket Framework
https://github.com/pakalpa/tauri-dynamic-update-server

dynamic rust rust-rocket server tauri update

Last synced: 1 day ago
JSON representation

A Simple Dynamic Update Server for Tauri Based Applications written in Rust + Rocket Framework

Awesome Lists containing this project

README

        

# Simple Dynamic Update Server for Tauri Written in Rust ๐Ÿฆ€ + Rocket ๐Ÿš€

[Tauri Dynamic Update Server](https://github.com/pAkalpa/tauri-dynamic-update-server) is a minimalistic server that can be used to serve updates to Tauri applications dynamically.

# ๐Ÿงฉ Develop

To download and run this rust/rocket project locally, the only prerequisite is rust with the `cargo` package manager.
Clone this repo, install the dependencies (all local), and run the development server:

```bash
git clone https://github.com/pAkalpa/tauri-dynamic-update-server.git
cd tauri-dynamic-update-server
cargo install
cargo run

# You will see something like:
#
# >> port: 8000
# ...
# >> cli colors: true
#Routes:
# >> (index) GET /
# >> (get_update_data) GET /?&
#Fairings:
# >> Add CORS headers to responses (response)
# >> Shield (liftoff, response, singleton)
#Shield:
# >> X-Frame-Options: SAMEORIGIN
# >> X-Content-Type-Options: nosniff
# >> Permissions-Policy: interest-cohort=()
#Rocket has launched from http://127.0.0.1:8000

```

The development api will be running on `http://localhost:8000`.

## ๐Ÿ› ๏ธ Deploy from source

The _production_ build of the api is optimized for performance and is performed by the `cargo build --release` command,
after installing the required dependencies.

```bash
cargo build --release
```

The app will be running on the specified port, e.g. `http://localhost:8000`.

## ๐Ÿณ Deploy with Docker

Build and run:

```bash
docker build -t dynamic-update-server .
docker run -e github_token=mygithubtoken -e github_repo_owner=mygithubusername -e github_repo_name=mytauriappreponame -d -p 8000:8000 dynamic-update-server
```

Or run the [published](https://hub.docker.com/r/pasinduakalpa/dynamicus) container:

- manually: `docker run -e github_token=mygithubtoken -e github_repo_owner=mygithubusername -e github_repo_name=mytauriappreponame -d -p 8000:8000 pasinduakalpa/dynamicus:latest`

---

2024 ยท [Pasindu Akalpa](https://www.github.com/pAkalpa) ยท License: [MIT](LICENSE) ยท Made with ๐Ÿ’œ