{"id":28965305,"url":"https://github.com/georges034302/az-function-app-nodejs","last_synced_at":"2026-05-09T09:13:59.642Z","repository":{"id":294849039,"uuid":"988224940","full_name":"Georges034302/az-function-app-nodejs","owner":"Georges034302","description":"Build, test, and deploy Azure Functions using IDE","archived":false,"fork":false,"pushed_at":"2025-06-05T09:20:10.000Z","size":51,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T10:25:46.091Z","etag":null,"topics":["azurefunctions","bash","nodejs"],"latest_commit_sha":null,"homepage":"","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/Georges034302.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,"zenodo":null}},"created_at":"2025-05-22T08:32:38.000Z","updated_at":"2025-06-05T09:20:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"202b97e7-f3de-482a-acdc-a90bd5b9e193","html_url":"https://github.com/Georges034302/az-function-app-nodejs","commit_stats":null,"previous_names":["georges034302/az-function-app-nodejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Georges034302/az-function-app-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Georges034302%2Faz-function-app-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Georges034302%2Faz-function-app-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Georges034302%2Faz-function-app-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Georges034302%2Faz-function-app-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Georges034302","download_url":"https://codeload.github.com/Georges034302/az-function-app-nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Georges034302%2Faz-function-app-nodejs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261618140,"owners_count":23185097,"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":["azurefunctions","bash","nodejs"],"created_at":"2025-06-24T06:10:49.222Z","updated_at":"2026-05-09T09:13:54.593Z","avatar_url":"https://github.com/Georges034302.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📘 Student CSV Processor — Azure Function App\n\nThis project demonstrates a serverless solution using an Azure Blob-triggered JavaScript function. When a CSV file is uploaded to a designated Blob container, the function is triggered automatically. It parses student records and inserts them into Azure Table Storage for further use (e.g., analytics, dashboards, auditing).\n\n---\n\n## 📂 Project Structure\n\n```\nconfig-app.sh                   # Bash script to configure Azure resources\nREADME.md                       # Project documentation\nstudents.csv                    # Sample CSV input\nupload.sh                       # Bash script to upload a test CSV\n\nstudent-app/\n├── ProcessStudentCSV/                 ✅ function folder\n│   ├── function.json                  ✅ trigger config\n│   ├── index.js                       ✅ blob handler\n│   ├── parseCsv.js                    ✅ parse CSV file\n│   ├── insertStudent.js               ✅ create student record\n│   └── tableClient.js                 ✅ creates Table storage\n├── host.json                          ✅ global configuration for Function app\n├── local.settings.json\n└── package.json\n```\n\n---\n\n## 🧰 Technology Stack\n\n- **Azure Functions v4** (Node.js runtime)\n- **Azure Blob Storage** — for CSV uploads\n- **Azure Table Storage** — for structured student data\n- **JavaScript (Node.js 18+)**\n- **NPM Packages**: `@azure/data-tables`, `csv-parse`, `uuid`\n\n---\n\n## 🚀 Initial Setup\n\n- **Create the Azure Function app project**\n  ```bash\n  func init student-app --worker-runtime node --language javascript\n  ```\n\n- **Create a new Blob trigger function**\n  ```bash\n  cd student-app\n  func new --name ProcessStudentCSV --template \"Azure Blob Storage trigger\"\n  ```\n---\n\n## ✅ Requirements\n\n### 🔧 Local Prerequisites\n\n- **Azure Functions Core Tools v4**\n  ```bash\n  npm i -g azure-functions-core-tools@4 --unsafe-perm true\n  func --version  # Should start with 4.x\n  ```\n\n- **Node.js 18 or later**\n- **Install project dependencies**\n  ```bash\n  cd student-app\n  npm install\n  ```\n\n- **Install required NPM packages**\n  ```bash\n  cd student-app\n  npm install @azure/data-tables csv-parse uuid\n  ```\n---\n\n### ☁️ Azure Prerequisites\n\n- **Azure Subscription**\n- **Azure Storage Account \u0026 Blob Container**\n  - Automatically created via `config-app.sh`\n- **Role Assignment:**\n  - `Storage Blob Data Contributor`\n  - `Storage Table Data Contributor`\n  Assign these roles to your user (using Azure CLI or Azure Portal):\n  ```bash\n  az role assignment create --assignee \u003cyour-user-object-id\u003e \\\n      --role \"\u003crole\u003e\" \\\n      --scope \"/subscriptions/\u003csubscription-id\u003e/resourceGroups/\u003cresource-group\u003e/providers/Microsoft.Storage/storageAccounts/\u003cstorage-account-name\u003e\"\n  ```\n\n---\n\n## ⚙️ Setup and Deployment\n\n### 1. Configure Azure Resources\nRun the setup script to provision a resource group, storage account, container, and function app:\n\n```bash\nbash config-app.sh\n```\n\n### 2. Deploy to Azure\nPublish the function to Azure:\n\n```bash\ncd student-app\nfunc azure functionapp publish student-app --javascript\n```\n\n---\n\n## 3. Test the Function\n\nAfter deployment, run the upload script to trigger the function by uploading a sample CSV file:\n\n```bash\nbash upload.sh\n```\n\nCheck the Function App logs (via Azure Portal or `func azure functionapp log-stream`) to verify successful execution and record insertion.\n\n---\n\n## 📌 Notes\n\n- The function is triggered by any CSV file uploaded to the `student-files` container.\n- The trigger pattern in `function.json` is configured as:\n  ```json\n  {\n    \"path\": \"student-files/{name}\",\n    ...\n  }\n  ```\n- Each student record is parsed and inserted individually into the `StudentGrades` table.\n\n---\n\n### 👨‍💻 Author: Georges Bou Ghantous\n\nThis repository demonstrates Azure Functions deployment using vscode and Azure Functions core CLI.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorges034302%2Faz-function-app-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorges034302%2Faz-function-app-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorges034302%2Faz-function-app-nodejs/lists"}