Runway
Runway is built and operated in the EU!

Deploy Deno

First steps

Deno is natively supported on the Runway platform and the following example describes how to deploy an application written in Typescript using the Deno engine.

Setup

To run an application, no additional config is required as our buildpack sets sensible defaults. However, if you need additional environment variables or maybe even FFI, then our documentation lists all options available to you.

Example

For brevity, we created a project with deno init and replaced the example (in main.ts) with a small server that takes a PORT variable so we can set the port while deploying the application.

deno init my-app
cd my-app
import { serve } from "https://deno.land/std@0.205.0/http/server.ts";

const PORT = parseInt(Deno.env.get("PORT") || "8000", 10);

const handler = (request: Request): Response => {
  const url = new URL(request.url);

  if (url.pathname === "/") {
    console.debug(request)
    return new Response("Hello, World!", { status: 200 });
  }

  return new Response("Not Found", { status: 404 });
};

console.log(`HTTP web server running. Access it at: http://localhost:${PORT}/`);
serve(handler, { port: PORT });

Create the app on Runway (this also initializes a git repository, if none exists yet), then commit your changes:

runway app create
git add -A && git commit -m "initial commit"

Deploy to Runway

runway app deploy

Run runway app open to see it live, or check the Runway UI. Check runway app logs if something’s off.