{"id":22006498,"url":"https://github.com/anoff/azure-fns-demo","last_synced_at":"2026-02-14T02:42:21.175Z","repository":{"id":75748616,"uuid":"99841769","full_name":"anoff/azure-fns-demo","owner":"anoff","description":"Demo for nodeJS deployment on azure functions ⚡️ ","archived":false,"fork":false,"pushed_at":"2017-08-09T20:07:24.000Z","size":150,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T13:29:17.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/anoff.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-08-09T18:42:59.000Z","updated_at":"2017-08-09T18:42:59.000Z","dependencies_parsed_at":"2023-06-07T13:45:27.008Z","dependency_job_id":null,"html_url":"https://github.com/anoff/azure-fns-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anoff/azure-fns-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoff%2Fazure-fns-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoff%2Fazure-fns-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoff%2Fazure-fns-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoff%2Fazure-fns-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anoff","download_url":"https://codeload.github.com/anoff/azure-fns-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anoff%2Fazure-fns-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29432560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T02:20:56.896Z","status":"ssl_error","status_checked_at":"2026-02-14T02:11:29.478Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-30T01:12:31.094Z","updated_at":"2026-02-14T02:42:21.171Z","avatar_url":"https://github.com/anoff.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lookup for talk at @nodestuttgart\n\u003e Lookup stuff\n\n## Resources:\n* [functions-cli](https://www.npmjs.com/package/azure-functions-core-tools) (windows only 😑): CLI to help you develop locally \u0026 deploy\n* [az-fn node reference](https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-node): how to write nodeJS code for functions\n* [azure table storage](https://docs.microsoft.com/en-us/azure/storage/storage-nodejs-how-to-use-table-storage): How to use table storage\n* [az-fn table storage bindings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-table): How to use table storage with functions\n* [az-fn documentDB bindings](https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-documentdb#using-a-documentdb-api-input-binding): Using documentDB (cosmosDB) with functions\n\n\n## cheatsheet\n\n### HTTP POST\n\n```javascript\nmodule.exports = function (context, req) {\n    context.log('JavaScript HTTP trigger function processed a request.')\n\n    if (req.body \u0026\u0026 req.body.title \u0026\u0026 req.body.content \u0026\u0026 req.body.author) {\n        context.res = 'yarrrrr'\n    }\n    else {\n        context.log(typeof req.body)\n        context.res = {\n            status: 400,\n            body: \"Please pass 'title', 'content' and 'author' in the body\"\n        }\n    }\n\n    context.done()\n};\n```\n\n### HTTP POST w/ database write\n\n```javascript\nmodule.exports = function (context, req) {\n    context.log('JavaScript HTTP trigger function processed a request.')\n\n    if (req.body \u0026\u0026 req.body.title \u0026\u0026 req.body.content \u0026\u0026 req.body.author) {\n        const id = '_' + Math.random().toString(36).substr(2, 9) // THIS IS NOT GOOD\n        context.bindings.outputDocument = JSON.stringify({ \n            id,\n            author: req.body.author,\n            title: req.body.title,\n            content: req.body.content,\n            created_at: Date.now()\n        })\n        context.res = {\n            status: 200,\n            body: {id}\n        }\n    }\n    else {\n        context.log(typeof req.body)\n        context.res = {\n            status: 400,\n            body: \"Please pass 'title', 'content' and 'author' in the body\"\n        }\n    }\n\n    context.done()\n}\n```\n\n`SETUP`\n\n![](http_post.png)\n![](http_post_db.png)\n\n### HTTP GET w/ db IN\n\n```javascript\nmodule.exports = function (context, req) {\n    context.log(`GET request for ${req.params.postId}`)\n    context.res = {\n        // status: 200, /* Defaults to 200 */\n        body: context.bindings.inputDocument\n    };\n    context.done();\n};\n```\n\n`SETUP`\n\n![](http_get.png)\n![](http_get_db.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoff%2Fazure-fns-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanoff%2Fazure-fns-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanoff%2Fazure-fns-demo/lists"}