Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/guide/api-environment-frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const server = await createServer({
// Any consumer of the environment API can now call `dispatchFetch`
if (isFetchableDevEnvironment(server.environments.custom)) {
const response: Response = await server.environments.custom.dispatchFetch(
new Request('/request-to-handle'),
new Request(HOST_NAME + '/request-to-handle'),
)
}
```
Expand Down Expand Up @@ -196,7 +196,7 @@ if (ssrEnvironment instanceof CustomDevEnvironment) {
// virtual:entrypoint
const { createHandler } = await import('./entrypoint.js')
const handler = createHandler(input)
const response = handler(new Request('/'))
const response = handler(new Request(HOST_NAME + '/'))

// -------------------------------------
// ./entrypoint.js
Expand Down Expand Up @@ -266,7 +266,7 @@ if (ssrEnvironment instanceof RunnableDevEnvironment) {
throw new Error(`Unsupported runtime for ${ssrEnvironment.name}`)
}

const req = new Request('/')
const req = new Request(HOST_NAME + '/')

const uniqueId = 'a-unique-id'
ssrEnvironment.send('request', serialize({ req, uniqueId }))
Expand All @@ -290,7 +290,7 @@ import.meta.hot.on('request', (data) => {
import.meta.hot.send('response', serialize({ res: res, uniqueId }))
})

const response = handler(new Request('/'))
const response = handler(new Request(HOST_NAME + '/'))

// -------------------------------------
// ./entrypoint.js
Expand Down