Skip to content

About

A web-based distributed Condorcet voting application

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

logo FriendVote

Running the application server

prerequisites for compilation

  • check out the repo, and install the rust toolchain (see https://rustup.rs)
  • Add WASM as a compilation target to your Rust toolchain with rustup target add wasm32-unknown-unknown
  • Install cargo-leptos with cargo install cargo-leptos (make sure perl and make are installed first)
  • set up a PostgreSQL database, and create a database called 'friendvote' in it, and give a user full access to that database.

Debug

This method is intended for debugging only, and results in a larger WASM file, making it slower than a release. Use

DATABASE_URL=postgresql://<username>:<password>@localhost/friendvote cargo leptos watch

(where <username> and <password> are the credentials for the postgres user that has read and write access to the friendvote database)

Release

Either download a pre-compiled release build from github, or build one yourself with cargo leptos build --release

After that, the minimum files needed are:

  1. The server binary located in target/release/friendvote
  2. The site directory and all files within located in target/site

Copy these files to your remote server. The directory structure should be:

friendvote
site/

Set the following environment variables (updating for your project as needed):

LEPTOS_OUTPUT_NAME="friendvote"
LEPTOS_SITE_ROOT="site"
LEPTOS_SITE_PKG_DIR="pkg"
LEPTOS_SITE_ADDR="0.0.0.0:80"
LEPTOS_RELOAD_PORT="3001"
DATABASE_URL="postgresql://<username>:<password>@localhost/friendvote"

Finally, run the server binary.

On Linux, if not running as root, you may need to add net binding capability with setcap cap_net_bind_service=ep friendvote on the server binary.

Licensing

Copyright © 2026 Simon De Ridder

FriendVote is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

FriendVote 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with FriendVote. If not, see https://www.gnu.org/licenses/.

About

A web-based distributed Condorcet voting application

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages