@astrojs/deno
Advanced tools
Comparing version 0.2.0 to 1.0.0
# @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 @@ |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
32126
1
145