A voting app to allow users to vote on, given multiple choices. It uses axum
on
the backend and Svelte
on the frontend using Vite
build tool. It
uses PostgreSQL
as the database.
You can build this app in 2 ways:
- Using the docker image
- Manually building the app
Pull the published docker image:
docker pull ghcr.io/hamza1311/electer:latest
Once the pull completes, you can run the image as:
docker run -d --network host --name electer --env "DATABASE_URL=YOUR_POSTGRES_INSTANCE" --env "PORT=PORT_TO_RUN_ON" ghcr.io/hamza1311/electer
In order to build the app manually, following tools must be installed:
cd frontend
npm install
npm run build
cargo build --release
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 |
Your contributions are welcome.