Skip to content

Commit

Permalink
Add note about getConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Mar 29, 2018
1 parent 9f4e707 commit cfe748d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ module.exports = {
```js
// pages/index.js
import getConfig from 'next/config'
const {serverRuntimeConfig, publicRuntimeConfig} = getConfig()
const {serverRuntimeConfig, publicRuntimeConfig} = getConfig() // Only holds serverRuntimeConfig and publicRuntimeConfig from next.config.js nothing else.

console.log(serverRuntimeConfig.mySecret) // Will only be available on the server side
console.log(publicRuntimeConfig.staticFolder) // Will be available on both server and client
Expand Down

0 comments on commit cfe748d

Please sign in to comment.