This project is a simple webpage that fetches data from a Google Sheets document, displays the data in a dropdown menu, and generates a URL based on the selected dropdown value.
The site was built to help simplify the formerly-manual process for fundraising ambassadors to easily build links both to firect donors to give to specific groups, as well as to associate those gifts with their fundraising efforts.
Note: Currently the code has a few things that are still hard-coded for one particular usecase. It may require some additional modifications to use for other purposes
To get started, follow the steps below to set up and run the project locally.
http.server
module) is recommended to avoid CORS issues while testing locally.Clone the Repository
Edit API key and base URL
main.mjs
.export function buildURL(
with ones appropriate for your usecase. See the Sheets API documentation for more details.
Run Locally:
python -m http.server 8000
Then, navigate to http://localhost:8000
in your browser
This project uses Jasmine for unit testing.
To set up testing, run npm install
If your API key is restricted to a certain domain, you may need to create a new one for testing.
To run the tests, run: TEST_KEY="[YOUR TEST KEY]" npm test