Deno Deploy Quick Start
Deno Deploy is a globally distributed platform for serverless JavaScript applications. Your JavaScript, TypeScript, and WebAssembly code runs on managed servers geographically close to your users, enabling low latency and faster response times. Deploy applications run on fast, light-weight V8 isolates rather than virtual machines, powered by the Deno runtime.
Let's deploy your first application - it should only take a few minutes. The easiest way to get start with Deno Deploy is to use our Playground editor. Clicking that link will drop you into Hello World application, you can click the Fork button to edit it.
The simplest Deno Deploy example is a web server that just returns a fixed string for every response. It looks like this:
Deno.serve(_req => {
return new Response("Hello, World!");
});
This server can also be built locally and run with the deno
command line
runtime. If we create a file called server.ts
on your computer, and include
the source code above. Then you can test that it works by running it with the
command below:
deno run --allow-net server.ts
Your server should be viewable at localhost:8000. Now let's run this code on the edge with Deno Deploy!
Of course there are more advanced ways to deploy servers on Deno Deploy using
Github Integration or the deployctl
command line utility. Here's of the
different ways to deploy:
Option 1: Start with a template to build a github repo
If you'd like to start out by deploying a pre-built template application, simply log in to the Deno Deploy dashboard and click the "New Project" button. You can choose to deploy a starter web application using Fresh or any of our supported web frameworks.
Option 2: Start with an existing app
If you already have a Deno project hosted on GitHub, you can immediately import it in Deno Deploy. From the Deno Deploy dashboard, click the "New Project" button and choose the option to "Select a repository". Follow the on-screen instructions to deploy your existing application.
Option 3: Start with a playground
As mentioned above, a playground is a browser-based editor that enables you to write and run JavaScript code right away. This is a great choice for just kicking the tires on Deno and Deno Deploy! From the Deno Deploy dashboard, click the "New Project" button and choose any of the options with a "Try with a playground" button.
Option 4: Start from scratch
If you'd like to develop and deploy a simple application locally, use the
deployctl
command line utility. To learn more about how to use deployctl
to follow the
instructions here.
Next Steps
Now that you've created your first project, you can check out the kinds of apps you can run on Deploy. You could also skip right to setting up your own custom domain. We're so excited to see what you'll ship with Deploy!