forked from honojs/honox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs and an e2e test for variables and bindings from wrangler.toml
- Loading branch information
1 parent
828736f
commit 66fb0d7
Showing
9 changed files
with
360 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { createRoute } from "../../../../src/factory"; | ||
|
||
export default createRoute((c) => { | ||
return c.json({ env: c.env }) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
import mdx from '@mdx-js/rollup' | ||
import { defineConfig } from 'vite' | ||
import { getPlatformProxy } from 'wrangler' | ||
import honox from '../../src/vite' | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
honox({ | ||
entry: './app/server.ts', | ||
}), | ||
mdx({ | ||
jsxImportSource: 'hono/jsx', | ||
}), | ||
], | ||
export default defineConfig(async () => { | ||
const { env, dispose } = await getPlatformProxy() | ||
return { | ||
plugins: [ | ||
honox({ | ||
entry: './app/server.ts', | ||
devServer: { | ||
env, | ||
plugins: [{ onServerClose: dispose }], | ||
}, | ||
}), | ||
mdx({ | ||
jsxImportSource: 'hono/jsx', | ||
}), | ||
], | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[vars] | ||
TEST_VARIABLE = "TEST_VARIABLE_VALUE" | ||
|
||
[[d1_databases]] | ||
binding = "DB" | ||
database_name = "DB_NAME" | ||
database_id = "DB_ID" | ||
|
Oops, something went wrong.