{"id":16957236,"url":"https://github.com/zekth/azure-function-fastify","last_synced_at":"2025-04-05T15:23:22.668Z","repository":{"id":37798912,"uuid":"377775793","full_name":"zekth/azure-function-fastify","owner":"zekth","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-10T15:58:48.000Z","size":77,"stargazers_count":2,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-11T12:19:28.389Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zekth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-17T09:29:34.000Z","updated_at":"2023-04-24T04:46:06.000Z","dependencies_parsed_at":"2024-10-18T21:05:09.756Z","dependency_job_id":"59200475-df9e-4543-bc73-2226a16ef465","html_url":"https://github.com/zekth/azure-function-fastify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"fastify/skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekth%2Fazure-function-fastify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekth%2Fazure-function-fastify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekth%2Fazure-function-fastify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zekth%2Fazure-function-fastify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zekth","download_url":"https://codeload.github.com/zekth/azure-function-fastify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247355095,"owners_count":20925551,"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-13T22:17:22.887Z","updated_at":"2025-04-05T15:23:22.639Z","avatar_url":"https://github.com/zekth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Function Fastify\n\nInspired by the AWSLABS [aws-serverless-express](https://github.com/awslabs/aws-serverless-express) library tailor made for the [Fastify](https://www.fastify.io/) web framework.\n\n**No use of internal sockets, makes use of Fastify's [inject](https://www.fastify.io/docs/latest/Testing/#testing-with-http-injection) function.**\n\n## Usage\n\n```js\nconst fastify = require('fastify');\nconst azureFunctionFastify = require('azure-function-fastify');\n\nconst app = fastify();\nconst opts = {\n  binaryMimeTypes: ['image/jpg', 'image/png'],\n};\nconst promiseHandler = azureFunctionFastify(app, opts);\nconst callbackHandler = azureFunctionFastify(app, opts, () =\u003e {\n  console.log(\"I'm the callback\");\n});\n```\n\n### Options\n\n| property        | description                                                                     | default value |\n| --------------- | ------------------------------------------------------------------------------- | ------------- |\n| binaryMimeTypes | Mime types to handle as Binary. Other mime types will be parsed as String Utf-8 | []            |\n\n## Example\n\n```js\nconst fastify = require('fastify');\nconst azureFunctionFastify = require('azure-function-fastify');\n\nconst app = fastify();\napp.get('/example', async (request, reply) =\u003e {\n  return reply.send({ test: 'get example' });\n});\napp.post('/example', async (request, reply) =\u003e {\n  return reply.send({ test: 'post example', ...request.body });\n});\nconst handler = azureFunctionFastify(app);\nif (require.main === module) {\n  // called directly i.e. \"node app\"\n  app.listen(3000, (err) =\u003e {\n    if (err) console.error(err);\n  });\n}\nmodule.exports = handler;\n```\n\n## Notes\n\n- Stateless only\n- Currently there is no proper way to log through the functions (as `context.log` is not available in the fasitfy app)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekth%2Fazure-function-fastify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzekth%2Fazure-function-fastify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzekth%2Fazure-function-fastify/lists"}