From 074fb931569dd2917501cace1bb3c22507d3c0b9 Mon Sep 17 00:00:00 2001 From: Nicolas Chaintron Date: Mon, 7 Oct 2024 05:06:41 +0200 Subject: [PATCH] docs: Add Runtime Config section (#37) Signed-off-by: Nicolas Chaintron --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index b8721a7..9bf417a 100644 --- a/README.md +++ b/README.md @@ -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