Socket
Socket
Sign inDemoInstall

vercel-deno-dev

Package Overview
Dependencies
26
Maintainers
1
Versions
191
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vercel-deno-dev

run deno on vercel


Version published
Weekly downloads
4
decreased by-73.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

vercel-deno

This runtime is currently on development and might be broken on some specific cases specified in the Known Limitation section.

Run Deno runtime on vercel. 🦕 + ▲ = ❤️

Usage

// now.json
{
  "functions": {
    "api/**/*.{ts,tsx}": {
      "runtime": "vercel-deno"
    }
  },
  "build":{
    "env":{
      "DENO_VERSION":"1.0.5 OR latest",
      "DENO_TSCONFIG":"tsconfig.json",
      "DENO_FLAGS":"--allow-read", 
      "DENO_UNSTABLE":true
    }
  }
}
// hello.ts

import {
  APIGatewayProxyEvent,
  APIGatewayProxyResult,
  Context
} from "https://deno.land/x/lambda/mod.ts";

export async function handler(
  event: APIGatewayProxyEvent,
  context: Context
): Promise<APIGatewayProxyResult> {
  return {
    body: `Welcome to deno ${Deno.version.deno} 🦕`,
    headers: { "content-type": "text/html;charset=utf8" },
    statusCode: 200
  };
}

Available config ( with default value )

DENO_VERSION : "latest"
DENO_TSCONFIG : ""
DENO_FLAGS : "--allow-all"
DENO_UNSTABLE : false

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

Known limitation

  • Limited to AWS Lambda gateway
  • Unable to send response with binary files
  • only works on linux, for now.

TODO

  • Suport Now Launcher
  • Support base64 conversion for binary files response
  • implement caching
  • add support for windows and macos

Credits

  • deno-lambda by Andy Hayden
  • now-deno by lucacasonato

FAQs

Last updated on 10 Jun 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc