How to deploy a Deno application

Rejoice! The long-awaited Deno 1.0 release is among us. What is Deno you ask?

Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

More Rust code is often something that makes us happy at Clever Cloud. So purely based on this, and because we like new, shiny toys, here’s how to deploy a Deno application on Clever Cloud.

Clever Cloud being a PaaS, there are a bunch of things that can happen automatically, some that can be configured through environment variables. But Deno is not fully integrated to all our tooling yet, so instead we are going to use a NodeJS application with a twist.

I am going to assume you already have our CLI Clever-tools installed, npm and git as well.

First thing first, create a git repo and a node package:

git init
npm init

Then we install Deno. And if there is something I do not like, it’s executing arbitrary shell script from the internet. So I am not going to use their installer. Deno is available as a downloadable binary from their Github Repo. It will do just fine in our case. Create a new folder for your application. From now on every file should be created in that folder.

Here’s a shell script that will manage the download and extraction of a specific Deno version:


Notice the use of $DENO_VERSION that will define which one will be downloaded. Let’s call this file and make it executable:

chmod +x

And now we can create the Clever Cloud application:

clever create --type node myDenoApplication

As I wrote earlier, we can specify custom behavior with environment variable. So let’s add one that will automate the installation of Deno with our script and one to specify the version we want:

clever env set CC_PRE_BUILD_HOOK ./
clever env set DENO_VERSION v1.0.0 

You can execute arbitrary scripts during the deployment of the application; here we want to execute before the build phase. You’ll find the list of hooks in our dedicated documentation.

For the application itself, I took a look at the available Deno module and because I am super lazy I chose the first web framework of the list, abc. There is an Hello World example in the Readme, that’s perfect for this test. So go ahead and create abc.js with the following content:

import { Application } from "";

const app = new Application();

  .get("/", (c) => {
    return "Hello, Abc!";
  .start({ port: 8080 });

The remaining question is, how do we launch this application? Remember that on Clever Cloud, the run process looks at your package.json the main file or start script to know what to execute. Let’s use this to our advantage and simply add a start script that uses the Deno binary downloaded by the script.

  "name": "abc-test",
  "version": "1.0.0",
  "description": "",
  "scripts": {
    "start":"./deno run --allow-net abc.js",
    "test": "echo \"Error: no test specified\" && exit 1"
  "author": "",
  "license": "ISC"

The only thing left to do is to commit your code and deploy it:

git add abc.js package.json
clever deploy

From there you should see logs of your deployment showing up. The final message should be Deployment successful. Now type clever open and it will automatically open the website in your default browser.

Granted, this is a little raw and it could feel like cheating but it works and your app benefits from all the Clever Cloud good stuffs, just like any another application:

  • environment variables injection
  • monitoring & alerting (auto restart)
  • zero downtime deployments
  • metrics (data & charts)
  • live logs
  • automatic scalability

If we see a growing interest in Deno in our community we will make sure it’s available with a proper, dedicated and simpler support. Let us know what you think about it and if you intend to use it!


À lire également

Clever Cloud joins the Eclipse Foundation: a commitment to the future of European open source

Clever Cloud, a French provider of Platform as a Service (PaaS) hosting and deployment solutions, is proud to become a contributing member of the Eclipse Foundation, a leading not-for-profit organisation in the field of open source.

Up to €100,000 in funding to adopt Hyper Open X technologies

The Hyper Open X consortium, made up of sixteen major French cloud players, has launched anambitious call for projects designed to accelerate the adoption of open source technologies for cloud and edge computing.

Clever Cloud announces international growth strategy and the expansion of leadership team

Nantes, France - Clever Cloud, French creator of Platform as a Service (PaaS) hosting and deployment solutions, announced today its intention to expand internationally, with a particular focus on the African and South Asian markets.
Company Press