mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
docs: pass event
to useRuntimeConfig
(#25788)
This commit is contained in:
parent
363bb57b63
commit
a6b3c512a3
@ -132,7 +132,7 @@ And then access the new CDN url using `config.app.cdnURL`.
|
|||||||
|
|
||||||
```ts [server/api/foo.ts]
|
```ts [server/api/foo.ts]
|
||||||
export default defineEventHandler((event) => {
|
export default defineEventHandler((event) => {
|
||||||
const config = useRuntimeConfig()
|
const config = useRuntimeConfig(event)
|
||||||
|
|
||||||
// Access cdnURL universally
|
// Access cdnURL universally
|
||||||
const cdnURL = config.app.cdnURL
|
const cdnURL = config.app.cdnURL
|
||||||
|
Loading…
Reference in New Issue
Block a user