Deno
Deno is a secure JavaScript and TypeScript runtime with batteries-included tooling and standards-based APIs. Use this component when you want Diploi to manage cache-friendly builds and keep Deno services updated without self-hosting.
Add to your project
Section titled “Add to your project”Paste this entry into the components list in diploi.yaml to add Deno to your project.
components: - name: Deno identifier: deno package: https://github.com/diploi/component-deno#v2.7.14Deno reference
Section titled “Deno reference”Readme
Section titled “Readme”A generic Deno component that can be used to run any Deno app.
Uses the official Deno Docker image.
Operation
Section titled “Operation”Getting started
Section titled “Getting started”- In the Dashboard, click Create Project +
- Under Pick Components, choose Deno
- In Pick Add-ons, you can add one or multiple databases to your app
- Choose Create Repository, which will generate a new GitHub repo
- Lastly, click Launch Stack
Link to guide, explains how to add a custom domain and launch to production https://diploi.com/blog/hosting_deno_apps
Development
Section titled “Development”Runs deno task dev when deployment is started, which executes your app in watch mode with network and environment variable access:
deno run --watch --allow-net --allow-env src/main.tsNo deno install is required, as new import in TypeScript files will trigger Deno to automatically download and cache those modules as needed.
Production
Section titled “Production”Builds a production-ready image. Runs deno task prod to start your app with network and environment variable access:
deno run --allow-net --allow-env src/main.tsDependencies are cached during the build stage using deno cache ..