mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
chore: update Deno server import path (#7959)
This commit is contained in:
parent
a00cfb8942
commit
f3b234b258
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ npm run preview
|
||||||
After [performing a build](https://docs.astro.build/en/guides/deploy/#building-your-site-locally) there will be a `dist/server/entry.mjs` module. You can start a server by importing this module in your Deno app:
|
After [performing a build](https://docs.astro.build/en/guides/deploy/#building-your-site-locally) there will be a `dist/server/entry.mjs` module. You can start a server by importing this module in your Deno app:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import './dist/entry.mjs';
|
import './dist/server/entry.mjs';
|
||||||
```
|
```
|
||||||
|
|
||||||
See the `start` option below for how you can have more control over starting the Astro server.
|
See the `start` option below for how you can have more control over starting the Astro server.
|
||||||
|
@ -129,7 +129,7 @@ If you disable this, you need to write your own Deno web server. Import and call
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { serve } from 'https://deno.land/std@0.167.0/http/server.ts';
|
import { serve } from 'https://deno.land/std@0.167.0/http/server.ts';
|
||||||
import { handle } from './dist/entry.mjs';
|
import { handle } from './dist/server/entry.mjs';
|
||||||
|
|
||||||
serve((req: Request) => {
|
serve((req: Request) => {
|
||||||
// Check the request, maybe do static file handling here.
|
// Check the request, maybe do static file handling here.
|
||||||
|
|
Loading…
Add table
Reference in a new issue