
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@astrojs/deno
Advanced tools
A server-side rendering adapter for use with Deno targets. Write your code in Astro/Node and deploy to Deno servers.
In your astro.config.mjs use:
import { defineConfig } from 'astro/config';
import deno from '@astrojs/deno';
export default defineConfig({
adapter: deno()
});
After performing a build there will be a dist/server/entry.mjs
module. You can start a server simply by importing this module:
import './dist/entry.mjs';
This adapter automatically starts a server when it is imported. You can configure this through options:
import { defineConfig } from 'astro/config';
import deno from '@astrojs/deno';
export default defineConfig({
adapter: deno({
start: false
})
});
If disabling start you need to write your own web server and use handle
to render requests:
import { serve } from "https://deno.land/std@0.132.0/http/server.ts";
import { handle } from './dist/entry.mjs';
serve((req: Request) => {
// Check the request, maybe do static file handling here.
return handle(req);
});
You an also pass in a port/hostname to use:
import { defineConfig } from 'astro/config';
import deno from '@astrojs/deno';
export default defineConfig({
adapter: deno({
port: 8081,
hostname: 'myhost'
})
});
FAQs
Deploy your site to a Deno server
The npm package @astrojs/deno receives a total of 129 weekly downloads. As such, @astrojs/deno popularity was classified as not popular.
We found that @astrojs/deno demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.