docs: update runtime config migration (#4165)

This commit is contained in:
Manash Sonowal 2022-04-07 19:17:15 +05:30 committed by GitHub
parent f69a67472a
commit 6f8e7a8ac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,8 @@ export default defineNuxtConfig({
```ts [server/api/hello.ts]
import { useRuntimeConfig } from '#nitro';
const config = useRuntimeConfig()
export default (req, res) => {
// you can now access config.BASE_URL
return {