Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ranile/electer
https://github.com/ranile/electer
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ranile/electer
- Owner: ranile
- Created: 2021-11-10T19:09:50.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-11-26T04:27:13.000Z (about 3 years ago)
- Last Synced: 2024-10-12T23:44:16.424Z (3 months ago)
- Language: Rust
- Homepage: https://electer.mhamza.dev
- Size: 85.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Electer
A voting app to allow users to vote on, given multiple choices. It uses [`axum`](https://github.com/tokio-rs/axum) on
the backend and [`Svelte`](https://svelte.dev/) on the frontend using [`Vite`](https://vitejs.dev/) build tool. It
uses `PostgreSQL` as the database.## Hosting
You can build this app in 2 ways:
1. Using the docker image
2. Manually building the app### Building the docker image
Pull the published docker image:
```shell
docker pull ghcr.io/hamza1311/electer:latest
```Once the pull completes, you can run the image as:
```shell
docker run -d --network host --name electer --env "DATABASE_URL=YOUR_POSTGRES_INSTANCE" --env "PORT=PORT_TO_RUN_ON" ghcr.io/hamza1311/electer
```### Manually building the app
In order to build the app manually, following tools must be installed:
- [Rust](https://www.rust-lang.org)
- [Node JS](https://nodejs.org/)#### Building frontend
```shell
cd frontend
npm install
npm run build
```#### Building backend
```shell
cargo build --release
```### Configuration
| Name | Required | Description | Default |
|----------------|------------|--------------------------------------------------------------------------|------------------|
| `DATABASE_URL` | ✅ | The path at which your instance of `PostgreSQL` is running | |
| `PORT` | ❌ | The port to run the server on | 8000 |
| `DIST_DIR` | ❌ | The path where frontend static files are (must **not** be set in docker) | `frontend/dist` |## Contributions
Your contributions are welcome.