{"id":15664642,"url":"https://github.com/justjavac/deno_deploy_examples","last_synced_at":"2025-10-05T02:42:07.903Z","repository":{"id":65976772,"uuid":"352825694","full_name":"justjavac/deno_deploy_examples","owner":"justjavac","description":"Deno Serverless 部署服务","archived":false,"fork":false,"pushed_at":"2021-04-01T01:37:30.000Z","size":35,"stargazers_count":16,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-06T19:13:36.862Z","etag":null,"topics":["deno"],"latest_commit_sha":null,"homepage":"https://jjc.deno.dev","language":"TypeScript","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/justjavac.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}},"created_at":"2021-03-30T00:46:38.000Z","updated_at":"2022-05-10T03:33:11.000Z","dependencies_parsed_at":"2023-02-19T19:15:53.911Z","dependency_job_id":null,"html_url":"https://github.com/justjavac/deno_deploy_examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/justjavac/deno_deploy_examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno_deploy_examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno_deploy_examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno_deploy_examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno_deploy_examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justjavac","download_url":"https://codeload.github.com/justjavac/deno_deploy_examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justjavac%2Fdeno_deploy_examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265950485,"owners_count":23853760,"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":["deno"],"created_at":"2024-10-03T13:43:39.223Z","updated_at":"2025-10-05T02:42:02.866Z","avatar_url":"https://github.com/justjavac.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deno_deploy_examples\n\n[![Build Status](https://github.com/justjavac/deno_deploy_examples/workflows/ci/badge.svg?branch=main)](https://github.com/justjavac/deno_deploy_examples/actions)\n[![license](https://img.shields.io/github/license/justjavac/deno_deploy_examples)](https://github.com/justjavac/deno_deploy_examples/blob/master/LICENSE)\n[![](https://img.shields.io/badge/deno-v1.8-green.svg)](https://github.com/denoland/deno)\n\nDeno 官方提供了一个类似 Cloudflare Workers 的 Serverless 平台，让开发者可以轻松的部署 Deno 代码。\n\n**注**：去年我注册了 deno.dev 域名，随后将其送给了 ry。目前此域名用于代码部署服务，代码的默认部署域名为\n`{project_name}-{deployment_id}.deno.dev`。\n\n## 步骤\n\n1. 进入 https://deno.com/deploy 网站，点击右上角 `Sign in`。\n2. 默认可以使用 github 直接登录。\n3. 点击 `New Project` 创建一个新项目。\n4. 可以直接通过 url 部署，或者在设置（`Setting`）里面关联 GitHub 后在每次 push 的时候自动部署。\n\n## 本地开发\n\n1. 安装命令行工具\n\n```shell\ndeno install --allow-read --allow-write --allow-env --allow-net --allow-run --no-check -r -f https://deno.land/x/deploy/deployctl.ts\n```\n\n2. 生成类型定义文件\n\n```shell\ndeployctl types \u003e deployctl.d.ts\n```\n\n3. 新建 mod.ts 文件开始编写代码\n\n```ts\n/// \u003creference path=\"./deployctl.d.ts\" /\u003e\n\naddEventListener(\"fetch\", (event: FetchEvent) =\u003e {\n  const response = new Response(\"Hello World!\", {\n    headers: { \"content-type\": \"text/plain\" },\n  });\n  event.respondWith(response);\n});\n```\n\n4. 本地启动服务\n\n```shell\ndeployctl run --no-check --watch ./mod.ts\n```\n\n⚠️ 目前需要添加 `--no-check` 参数。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustjavac%2Fdeno_deploy_examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustjavac%2Fdeno_deploy_examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustjavac%2Fdeno_deploy_examples/lists"}