mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-19 09:55:53 +00:00
docs: update runtime config migration (#4165)
This commit is contained in:
parent
f69a67472a
commit
6f8e7a8ac7
@ -43,6 +43,8 @@ export default defineNuxtConfig({
|
|||||||
```ts [server/api/hello.ts]
|
```ts [server/api/hello.ts]
|
||||||
import { useRuntimeConfig } from '#nitro';
|
import { useRuntimeConfig } from '#nitro';
|
||||||
|
|
||||||
|
const config = useRuntimeConfig()
|
||||||
|
|
||||||
export default (req, res) => {
|
export default (req, res) => {
|
||||||
// you can now access config.BASE_URL
|
// you can now access config.BASE_URL
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user