PollPal is a simple, web-based app that lets users sign in or create an account, vote on polls with a simple Yes or No, and view the results after voting. Users can also create and delete polls with ease in a clean interface. Additionally, users can change their username.
Visit https://pollpalvoter.web.app/ to try it out or follow usage if you want to spin it up locally.
- Load the
database_setup.sqlinto your database (you have to remove the old tables for this to work).- Connect to your PostgreSQL database using
psql. - Run the command:
\i database_setup.sql
- Connect to your PostgreSQL database using
- Navigate to the folder
pollpal_backend. - Create a
.envfile in that folder.- Edit it so it contains:
DATABASE_URL=postgres://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}
- Edit it so it contains:
- Install backend dependencies.
- Run the following command in the
pollpal_backendfolder:npm install
- Run the following command in the
- Build the frontend.
- Navigate to the frontend folder:
cd pollpal_frontend - Install dependencies and build the project:
npm install npm run build
- Move the generated
distfolder to the backend folder:mv dist ../pollpal_backend/
- Navigate to the frontend folder:
- Run the backend server.
- Navigate back to the backend folder:
cd ../pollpal_backend - Start the server:
node server.js
- Navigate back to the backend folder:
- Open the browser and enter
localhost:portnumber(you will see the port in the terminal).