Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vercel-deno-dev

Package Overview
Dependencies
Maintainers
1
Versions
191
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vercel-deno-dev

run deno on vercel

  • 0.1.0-85d85ec7946904a71b002f34d9839d7ac0a45667
  • npm
  • Socket score

Version published
Weekly downloads
97
decreased by-25.95%
Maintainers
1
Weekly downloads
 
Created
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

Package last updated on 09 Jun 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc