0.3.1 • Published 4 years ago

vercel-deno-runtime v0.3.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Deno Runtime for Vercel (vercel-deno-runtime)

A runtime designed for those who wants to migrate serverless functions built on Node runtime to 🦕Deno that is compatible with ▲Vercel's NowRequest and NowResponse.

Usage

// vercel.json
{
  "functions": {
    "api/**/*.{ts,tsx}": {
      "runtime": "vercel-deno-runtime"
    }
  },
  "build":{
    "env":{
      "DENO_VERSION":"1.1.0 OR latest",
      "DENO_CONFIG":"tsconfig.json",
      "DENO_UNSTABLE":true
    }
  }
}
// /api/hello.ts
import { NowRequest, NowResponse } from "https://unpkg.com/vercel-deno-runtime@latest/dist/boot/nowHandler.ts";
  
export default async function handler(req:NowRequest,res:NowResponse) {
  res.statuscode(200).send(`Welcome to deno ${Deno.version.deno} 🦕`);
}

Note: vercel v17.x or above are required to use the above configuration.

Configurations

NameDescriptionDefault
DENO_VERSIONWhich deno version to be used for serverless functionslatest
DENO_CONFIGImplement custom tsconfig.json to be used for serverless functions<empty>
DENO_UNSTABLEadd --unstable flag at build-time deno cache and runtime deno runfalse

Development

  • Suport Now Launcher
  • add support for windows
  • implement caching for downloading deno
  • add support for macos

References

0.3.1

4 years ago

0.3.0

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago