{"id":25567639,"url":"https://github.com/amsokol/gcp-cloud-functions-typescript-starter","last_synced_at":"2025-04-12T12:07:10.580Z","repository":{"id":91074435,"uuid":"97408836","full_name":"amsokol/gcp-cloud-functions-typescript-starter","owner":"amsokol","description":"Google (Cloud Platform) Cloud Functions TypeScript starter project","archived":false,"fork":false,"pushed_at":"2017-07-17T21:04:22.000Z","size":20,"stargazers_count":29,"open_issues_count":3,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T06:51:06.434Z","etag":null,"topics":["example","gcp","gcp-cloud-functions","google-cloud-functions","google-cloud-platform","javascript","nodejs","starter","template","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amsokol.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}},"created_at":"2017-07-16T20:19:45.000Z","updated_at":"2024-07-14T21:16:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd85986b-9622-4fc7-bd9c-cb0ea50fc294","html_url":"https://github.com/amsokol/gcp-cloud-functions-typescript-starter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amsokol%2Fgcp-cloud-functions-typescript-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amsokol%2Fgcp-cloud-functions-typescript-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amsokol%2Fgcp-cloud-functions-typescript-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amsokol%2Fgcp-cloud-functions-typescript-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amsokol","download_url":"https://codeload.github.com/amsokol/gcp-cloud-functions-typescript-starter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565062,"owners_count":21125416,"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":["example","gcp","gcp-cloud-functions","google-cloud-functions","google-cloud-platform","javascript","nodejs","starter","template","typescript"],"created_at":"2025-02-20T23:32:47.603Z","updated_at":"2025-04-12T12:07:10.575Z","avatar_url":"https://github.com/amsokol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google (Cloud Platform) Cloud Functions TypeScript starter project\n\n\u003c!-- TOC --\u003e\n\n- [Introduction](#introduction)\n- [Clone project](#clone-project)\n- [Build project (command-line)](#build-project-command-line)\n- [Deploy project to Cloud Functions Local Emulator (command-line)](#deploy-project-to-cloud-functions-local-emulator-command-line)\n- [Build bundle to deploy to Google Cloud Platform (command-line)](#build-bundle-to-deploy-to-google-cloud-platform-command-line)\n\n\u003c!-- /TOC --\u003e\n\n## Introduction\n\nCloud Functions come in two distinct variants: foreground (HTTP) and background.\nYou invoke HTTP functions from standard HTTP requests.You can use background functions to handle events from your Cloud infrastructure, such as messages on a Google Cloud Pub/Sub topic, or changes in a Google Cloud Storage bucket. This project includes three example functions:\n\n- `helloWorldHTTP` - foreground (HTTP) function\n- `helloWorldPubSub` - background functions to handle Google Cloud Pub/Sub topic events\n- `helloWorldStorage` - background functions to handle events from Google Cloud Storage bucket\n\n## Clone project\n\nClone project from GitHub:\n\n```bash\ngit clone https://github.com/amsokol/gcp-cloud-functions-typescript-starter.git\n```\n\nGo to to project folder:\n\n```bash\ncd gcp-cloud-functions-typescript-starter\n```\n\nOptional. You can open project in Visual Studio Code to to build and deploy project from GUI menu:\n\n```bash\ncode .\n```\n\n## Build project (command-line)\n\nIf you prefer command-line interface instead of Visual Studio Code than use the next commands to build project.\n\nInstall required `npm` modules:\n\n```bash\nnpm install\n```\n\nCompile TypeScript Cloud Function:\n\n```bash\ntsc\n```\n\nFile `index.js` is generated and is ready to deploy to **Cloud Functions**\n\n## Deploy project to Cloud Functions Local Emulator (command-line)\n\nIf you prefer command-line interface instead of Visual Studio Code than use the next commands to deploy project.\n\nThe **Cloud Functions Emulator** is distributed as a standard NPM package, so you can install it with a standard `npm install` command:\n\n```bash\nnpm install -g @google-cloud/functions-emulator\n```\n\nBefore you can deploy a function, you need to start the Emulator as follows:\n\n```bash\nfunctions start\n```\n\nDeploy an HTTP `helloWorld` function to the **Emulator** as follows:\n\n```bash\nnpm run deploy-local\n```\n\nOpen [helloWorld](http://localhost:8010/amsokol-me/us-central1/helloWorld) link in browser to see results.\n\nSee [Cloud Functions Local Emulator](https://cloud.google.com/functions/docs/emulator) for more details.\n\n## Build bundle to deploy to Google Cloud Platform (command-line)\n\nIf you prefer command-line interface instead of Visual Studio Code than use the next commands to create zip archive for deployment.\n\nFor Windows using `PowerShell`:\n\n```bash\nnpm run package-zip(windows)\n```\n\nFor Linux/Unix using `zip` utility (you have to install it before):\n\n```bash\nnpm run package-zip(linux)\n```\n\nIt creates `helloWorld.zip` that includes `index.js`, `package.json`, `settings.json` files.\n`helloWorld.zip` is ready to be deployed to **Google Cloud Platform**.\n\nSee [Deploying from Your Local Machine](https://cloud.google.com/functions/docs/deploying/filesystem) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famsokol%2Fgcp-cloud-functions-typescript-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famsokol%2Fgcp-cloud-functions-typescript-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famsokol%2Fgcp-cloud-functions-typescript-starter/lists"}