https://github.com/ceceliacreates/ballot-api
A Netlify Function Express API
https://github.com/ceceliacreates/ballot-api
api express netlify netlify-functions
Last synced: 7 months ago
JSON representation
A Netlify Function Express API
- Host: GitHub
- URL: https://github.com/ceceliacreates/ballot-api
- Owner: ceceliacreates
- License: mit
- Created: 2020-11-14T01:24:37.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-29T22:50:47.000Z (almost 5 years ago)
- Last Synced: 2025-04-13T10:14:33.843Z (7 months ago)
- Topics: api, express, netlify, netlify-functions
- Language: JavaScript
- Homepage: https://hungry-brown-da828c.netlify.app/.netlify/functions/server/ballots
- Size: 1.03 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Netlify Function Express API
This is the API for the [ballot-cure](https://github.com/ceceliacreates/ballot-cure) app.
The deployed endpoint URL is:
https://hungry-brown-da828c.netlify.app/.netlify/functions/server/ballots
The `ballot-cure` app makes two requests to a single `/ballots/:id` endpoint:
- A GET that returns the ballot matching the passed ID
- A POST request that updates the ballot matching the passed ID (handled by our HTTP.fileUpload() function)
Note: Because we aren’t updating a database, our data is not persistent. This Function is just for demonstration and to process our front-end request.
## CORS-enabled
There is a `cors-enabled` branch that can be used when running the front end locally in a browser.