{"id":13686107,"url":"https://github.com/lucacasonato/now-deno","last_synced_at":"2025-04-06T20:08:50.222Z","repository":{"id":36684442,"uuid":"229341459","full_name":"lucacasonato/now-deno","owner":"lucacasonato","description":"Deno builder for Vercel - run Deno on Vercel. :sauropod: + λ = :heart:","archived":false,"fork":false,"pushed_at":"2022-06-25T09:39:12.000Z","size":158,"stargazers_count":264,"open_issues_count":10,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-01T14:25:40.865Z","etag":null,"topics":["deno","lambda","serverless","vercel"],"latest_commit_sha":null,"homepage":"http://npmjs.com/package/now-deno","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/lucacasonato.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}},"created_at":"2019-12-20T21:51:34.000Z","updated_at":"2024-04-01T11:13:28.000Z","dependencies_parsed_at":"2022-09-25T21:45:53.316Z","dependency_job_id":null,"html_url":"https://github.com/lucacasonato/now-deno","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacasonato%2Fnow-deno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacasonato%2Fnow-deno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacasonato%2Fnow-deno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacasonato%2Fnow-deno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucacasonato","download_url":"https://codeload.github.com/lucacasonato/now-deno/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543589,"owners_count":20955865,"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","lambda","serverless","vercel"],"created_at":"2024-08-02T14:01:06.775Z","updated_at":"2025-04-06T20:08:50.196Z","avatar_url":"https://github.com/lucacasonato.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# now-deno\n\n\u003e Deno builder for Vercel - run Deno on `vercel`. 🦕 + λ = ❤️\n\nThis builder allows you to run [Deno](https://deno.land) as a lambda on `vercel`.\n\n## Usage\n\nIf you're unfamiliar with `vercel` runtimes, please read the [runtime docs](https://vercel.com/docs/runtimes) first. This runtime can be used like any other Community Runtime.\n\n```json\n// vercel.json\n{\n  \"functions\": {\n    \"api/**/*.{j,t}s\": {\n      \"runtime\": \"now-deno@0.4.0\"\n    }\n  }\n}\n```\n\nNote: You need `vercel` v17.x or above to use the above configuration.\n\n```ts\n// api/hello.ts\nimport {\n  APIGatewayProxyEvent,\n  APIGatewayProxyResult,\n  Context,\n} from 'https://deno.land/x/lambda/mod.ts';\n\nexport async function handler(\n  event: APIGatewayProxyEvent,\n  context: Context\n): Promise\u003cAPIGatewayProxyResult\u003e {\n  return {\n    statusCode: 200,\n    body: `Welcome to deno ${Deno.version.deno} 🦕`,\n    headers: {\n      'content-type': 'text/html; charset=utf-8',\n    },\n  };\n}\n```\n\nThat's the simplest way to use this runtime!\n\n## Advanced usage\n\n### Specific Deno version\n\nTo use a specific version of Deno you can specify a environment variable in your `vercel.json`:\n\n```json\n// vercel.json\n{\n  \"functions\": {\n    ...\n  },\n  \"env\": {\n    \"DENO_VERSION\": \"0.42.0\"\n  }\n}\n```\n\n### Unstable mode\n\nTo use Deno's `unstable` mode you can specify the environment variable `DENO_UNSTABLE` in your `vercel.json`:\n\n```json\n// vercel.json\n{\n  \"functions\": {\n    ...\n  },\n  \"env\": {\n    \"DENO_UNSTABLE\": \"true\"\n  }\n}\n```\n\n### TS Config\n\nTo pass a custom config, you can specify the variable `DENO_CONFIG` in your `now.json`:\n\n```json\n// now.json\n{\n  \"functions\": {\n    ...\n  },\n  \"env\": {\n    \"DENO_CONFIG\": \"tsconfig.json\"\n  }\n}\n```\n\n### Custom pre-package script\n\nYou can place a `build.sh` function in the root of your deploy directory. This will be executed before the function is packaged up.\n\n## `vercel dev`\n\n\u003e **`vercel dev` is currently only supported on macOS and Linux. It is not supported on Windows.**\n\nIf you have have `deno` installed in your path then you can use `vercel dev` with this runtime. It should work just like any other runtime.\n\n## Credits\n\nThis was only possible due to the great work of [Andy Hayden](https://github.com/hayd) who made the first attempts at running [deno in a lambda function](https://github.com/hayd/deno-lambda).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacasonato%2Fnow-deno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucacasonato%2Fnow-deno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacasonato%2Fnow-deno/lists"}