Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@astrojs/deno

Package Overview
Dependencies
Maintainers
4
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/deno - npm Package Compare versions

Comparing version 0.2.0 to 1.0.0

10

CHANGELOG.md
# @astrojs/node
## 1.0.0
### Major Changes
- [`04ad44563`](https://github.com/withastro/astro/commit/04ad445632c67bdd60c1704e1e0dcbcaa27b9308) - > Astro v1.0 is out! Read the [official announcement post](https://astro.build/blog/astro-1/).
**No breaking changes**. This package is now officially stable and compatible with `astro@1.0.0`!
## 0.2.0

@@ -35,3 +43,3 @@

```astro
<div>Your address { Astro.clientAddress }</div>
<div>Your address {Astro.clientAddress}</div>
```

@@ -38,0 +46,0 @@

6

package.json
{
"name": "@astrojs/deno",
"description": "Deploy your site to a Deno server",
"version": "0.2.0",
"version": "1.0.0",
"type": "module",

@@ -28,4 +28,4 @@ "types": "./dist/index.d.ts",

"devDependencies": {
"astro": "1.0.0-rc.1",
"astro-scripts": "0.0.6"
"astro": "1.0.0",
"astro-scripts": "0.0.7"
},

@@ -32,0 +32,0 @@ "scripts": {

@@ -80,51 +80,47 @@ # @astrojs/deno 🦖

<details>
<summary><strong>start</strong></summary>
### start
This adapter automatically starts a server when it is imported. You can turn this off with the `start` option:
This adapter automatically starts a server when it is imported. You can turn this off with the `start` option:
```js
import { defineConfig } from 'astro/config';
import deno from '@astrojs/deno';
```js
import { defineConfig } from 'astro/config';
import deno from '@astrojs/deno';
export default defineConfig({
output: 'server',
adapter: deno({
start: false
})
});
```
export default defineConfig({
output: 'server',
adapter: deno({
start: false
})
});
```
If you disable this, you need to write your own Deno web server. Import and call `handle` from the generated entry script to render requests:
If you disable this, you need to write your own Deno web server. Import and call `handle` from the generated entry script to render requests:
```ts
import { serve } from "https://deno.land/std@0.132.0/http/server.ts";
import { handle } from './dist/entry.mjs';
```ts
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.
serve((req: Request) => {
// Check the request, maybe do static file handling here.
return handle(req);
});
```
</details>
return handle(req);
});
```
<details>
<summary><strong>port</strong> and <strong>hostname</strong></summary>
### port and hostname
You can set the port (default: `8085`) and hostname (default: `0.0.0.0`) for the deno server to use. If `start` is false, this has no effect; your own server must configure the port and hostname.
You can set the port (default: `8085`) and hostname (default: `0.0.0.0`) for the deno server to use. If `start` is false, this has no effect; your own server must configure the port and hostname.
```js
import { defineConfig } from 'astro/config';
import deno from '@astrojs/deno';
```js
import { defineConfig } from 'astro/config';
import deno from '@astrojs/deno';
export default defineConfig({
output: 'server',
adapter: deno({
port: 8081,
hostname: 'myhost'
})
});
export default defineConfig({
output: 'server',
adapter: deno({
port: 8081,
hostname: 'myhost'
})
});
```
</details>

@@ -131,0 +127,0 @@ ## Examples

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc