A modern, real-time polling application built with Svelte, Vite, Express, and WebSockets. Create and participate in live polls with instant results visualization.
Clone the repository
git clone [repo-url]
cd pollify
Install dependencies
npm install
Start the development server
npm start
The application will be available at http://localhost:3000
.
├── backend/ # Express server and WebSocket logic
├── frontend/ # Svelte components and application code
├── public/ # Static assets
└── cypress/ # End-to-end tests
The backend is built with Express and provides the following endpoints:
POST /api/polls - Create a new pollGET /api/polls/:id - Get poll detailsPOST /api/polls/:id/vote - Submit a vote| Variable | Description | Default |
|---|---|---|
PORT |
Port to run the server on | 3000 |
HOST |
Host to bind the server to | locahost |
Run the test suite with:
npm test