On this page
How to deploy Deno on Kinsta
Kinsta Application Hosting is a service that lets you build and deploy your web apps directly from your Git repository.
Preparing your application Jump to heading
At Kinsta, we recommend using the
deno-bin
package to run Deno
applications.
To do so, your package.json
should look like this:
package.json
{
"name": "deno app",
"scripts": {
"start": "deno run --allow-net index.js --port=${PORT}"
},
"devDependencies": {
"deno-bin": "^1.28.2"
}
}
Example application Jump to heading
import { parseArgs } from "jsr:@std/cli";
const { args } = Deno;
const port = parseArgs(args).port ? Number(parseArgs(args).port) : 8000;
Deno.serve({ port }, (_req) => new Response("Hello, world"));
The application itself is self-explanatory. It's crucial not to hardcode the
PORT
but use the environmental variable Kinsta provides.
There is also a repository that should help you to get started.
Deployment Jump to heading
- Register on Kinsta Application Hosting or login directly to My Kinsta admin panel.
- Go to the Applications tab.
- Connect your GitHub repository.
- Press the Add service > Application button.
- Follow the wizard steps.
Help us make these docs great!
Make a contribution
Deno's docs are open source. See something that's wrong or unclear? Submit a pull request:
Edit this page