{"id":17465980,"url":"https://github.com/paladique/azuresample-jokesapi","last_synced_at":"2025-07-10T16:34:59.827Z","repository":{"id":54554803,"uuid":"332035036","full_name":"paladique/AzureSample-JokesApi","owner":"paladique","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-15T19:03:54.000Z","size":50,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T21:35:33.293Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paladique.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-22T18:50:38.000Z","updated_at":"2023-03-23T12:07:27.000Z","dependencies_parsed_at":"2022-08-13T19:31:09.508Z","dependency_job_id":null,"html_url":"https://github.com/paladique/AzureSample-JokesApi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paladique/AzureSample-JokesApi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-JokesApi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-JokesApi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-JokesApi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-JokesApi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paladique","download_url":"https://codeload.github.com/paladique/AzureSample-JokesApi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paladique%2FAzureSample-JokesApi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264608171,"owners_count":23636687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-18T13:07:26.596Z","updated_at":"2025-07-10T16:34:59.811Z","avatar_url":"https://github.com/paladique.png","language":"Python","readme":"# Joke Generator\n\n[HTTP Azure Function](https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook?\u0026WT.mc_id=academic-0000-jasmineg) that returns random jokes. [Based off this version built in JavaScript](https://github.com/alexweininger/joke-api)\n\n## Run locally via Command Line\n\n1. Install  [Azure Functions Core Tools](https://docs.microsoft.com/azure/azure-functions/functions-run-local?tabs=windows,csharp,bash\u0026WT.mc_id=academic-0000-jasmineg#install-the-azure-functions-core-tools)\n\n2. Clone this repository and navigate to its directory in your favorite command line tool\n\n3. In the command line run the following\n\n        `jokes-api \u003e func start`\n\n4. You should see something like this:\n\n    ```\n    Now listening on: http://0.0.0.0:7071\n    Application started. Press Ctrl+C to shut down.\n\n    Functions:\n\n            jokes-api: [GET,POST] http://localhost:7071/api/jokes-api\n\n    For detailed output, run func with --verbose flag.\n    [2021-01-22T19:06:20.689] Worker process started and initialized.\n    ```\n\n5. Test it out with [Postman](#testing-a-local-function)\n\n## Deploy to Azure via VS Code\n\n_FYI: There are MANY ways to deploy a function to Azure, you can find more info [here](https://docs.microsoft.com/azure/azure-functions/functions-deployment-technologies?WT.mc_id=academic-0000-jasmineg#deployment-methods)_\n\n1. Open your local copy in VS Code\n\n2. Install the [Azure Function Extension](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions\u0026WT.mc_id=academic-0000-jasmineg)\n\n2. In the Explorer, right click in the root directory and select `Deploy to Function App...`\n\n3. Follow the prompts that pop up at the top of the editor \n    - ⚠ You may be asked to sign in to your Azure account first\n\n4. You should see a \"Deploying to [your function app name]\" notification, and will changes to \"Deployment to [your function app name] completed\" when finished.\n\n5. Open the Azure Extension and search for your function app at [your function app name]. Confirm the `jokes-api` function exists\n    - ⚠ If not, try deploying again to [your function app name]\n\n6. Right click on the `jokes-api` function and select `Copy function Url`\n\n7. Test it out with [Postman](#testing-a-deployed-function)\n\n\n### It should look something like this:\n\n![sending a get request with postman](jokes-api-vsc.png)\n\n## Testing with Postman\n\nPostman makes it easy to send POST/GET/etc requests to endpoints, perfect for HTTP triggered functions! Download it here: [Postman download page](https://www.postman.com/downloads/)\n\n### Testing a Local Function\n- In Postman, click `Import` and find the collection in the repo named `AzureSamples.postman_collection.json` [found here](AzureSamples.postman_collection.json)\n- In the AzureSamples, collection open `Local - JokesAPIRequest`\n- Confirm that the url matches the one from step 4\n    - ⚠ if they're not the same use the url that was generated on your machine!\n- Click `Send`\n\n### Testing a Deployed Function\n\n- In Postman, click `Import` and find the collection in the repo named `AzureSamples.postman_collection.json` [found here](AzureSamples.postman_collection.json)\n- In the AzureSamples, collection open `JokesAPIRequest`\n- Paste the copied url from step 7, replacing the placeholder url\n- Click `Send`\n\n\n### It should look something like this:\n\n![sending a get request with postman](postman-request.png)\n\n\n📖 [Learn more about Azure Functions](https://docs.microsoft.com/en-us/azure/azure-functions/functions-overview?WT.mc_id=academic-0000-jasmineg)\n👩🏿‍🏫 [Microsoft Learn Modules on Azure Functions](https://docs.microsoft.com/en-us/learn/browse/?terms=azure%20functions\u0026WT.mc_id=academic-0000-jasmineg)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaladique%2Fazuresample-jokesapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaladique%2Fazuresample-jokesapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaladique%2Fazuresample-jokesapi/lists"}