Skip to content

Commit

Permalink
docs: Add Runtime Config section (#37)
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Chaintron <[email protected]>
  • Loading branch information
siiick authored Oct 7, 2024
1 parent b92b7af commit 074fb93
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,28 @@ For all available `serverConfig` options take a look at the [official repo READM

> We highly recommend you put your **production** keys in your `.env` file to avoid committing them
### Alternatively using [Runtime Config](https://nuxt.com/docs/guide/going-further/runtime-config)

```ts
export default defineNuxtConfig({
modules: ["@unlok-co/nuxt-stripe"],
runtimeConfig: {
// Server
stripe: {
key: 'sk_test_123',
options: {},
},
// Client
public: {
stripe: {
key: 'pk_test_123',
options: {},
},
},
},
});
```

## Development

Initial step: Clone this repository
Expand Down

0 comments on commit 074fb93

Please sign in to comment.