mirror of
https://github.com/hanzoai/kms.git
synced 2026-10-17 11:18:16 +00:00
- Fix 381 files where branding script corrupted variable names (e.g. isHanzo KMSTemplate -> isKmsTemplate) - Rebrand from "Hanzo KMS" to just "KMS" for white-label support (allows Lux KMS, Hanzo KMS, etc. via configuration) - 856 files, purely string replacements, no logic changes
33 lines
692 B
Plaintext
33 lines
692 B
Plaintext
---
|
|
title: "React"
|
|
description: "How to use KMS to inject environment variables and secrets into a React app."
|
|
---
|
|
|
|
Prerequisites:
|
|
|
|
- Set up and add envars to [KMS Cloud](https://kms.hanzo.ai)
|
|
- [Install the CLI](/cli/overview)
|
|
|
|
## Initialize KMS for your [Create React App](https://create-react-app.dev)
|
|
|
|
```bash
|
|
# navigate to the root of your of your project
|
|
cd /path/to/project
|
|
|
|
# then initialize kms
|
|
hanzo-kms init
|
|
```
|
|
|
|
## Start your application as usual but with KMS
|
|
|
|
```bash
|
|
hanzo-kms run -- <your application start command>
|
|
|
|
# Example
|
|
hanzo-kms run -- npm run dev
|
|
```
|
|
|
|
<Info>
|
|
React environment variables must be prefixed with `REACT_APP_` to show up within the application
|
|
</Info>
|