https://github.com/jacebenson/joke-api
https://github.com/jacebenson/joke-api
netlify serverless
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jacebenson/joke-api
- Owner: jacebenson
- Created: 2019-04-08T17:31:08.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T04:13:25.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T22:11:49.494Z (almost 2 years ago)
- Topics: netlify, serverless
- Language: JavaScript
- Homepage: https://joke.jace.pro
- Size: 4.78 MB
- Stars: 1
- Watchers: 1
- Forks: 4
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Joke API
## Deploy your own version to Netlify
[](https://app.netlify.com/start/deploy?repository=https://github.com/jacebenson/joke-api)
```sh
curl https://wizardly-wing-66188a.netlify.com/.netlify/functions/jokes
```
## Public Endpoints:
### Grab a random joke!
[https://wizardly-wing-66188a.netlify.com/.netlify/functions/server](https://wizardly-wing-66188a.netlify.com/.netlify/functions/server)
## How these jokes were collected
Full disclosure: I collected jokes from these sources initially;
* [15Dkatz/offical_joke_api](https://github.com/15Dkatz/official_joke_api)
* [mikemcbride/dad-jokes](https://github.com/mikemcbride/dad-jokes)
* [ChrisMcKenzie/dadjokes](https://github.com/ChrisMcKenzie/dadjokes)
* [Icanhazdadjoke](https://icanhazdadjoke.com)
* [The Oatmeal DJTAF](https://theoatmeal.com/djtaf/)
## Make a contribution!
Submit a Pull Request, with your joke added to the jokes.js file. Make sure the joke is in this format:
## Adding a normal joke
```javascript
{
"joke": "your joke's setup line",
"punchline": "your joke's punchline"
}
```
### Adding a oneline pun
```javascript
{
"joke": "your joke's setup line",
"punchline": null
}
```
### Run Locally
* Clone the repo
* Follow steps here, https://www.netlify.com/docs/functions/#tools-for-building-javascript-functions