API Key Management
Never expose API keys in client-side code or version control. Use environment variables and secrets management systems.
class="text-white/class="text-amber-400">30 italic">// DON'T do this
class="text-pink-400">const apiKey = class="text-emerald-class="text-amber-400">400">'sk_live_abc123'; class="text-white/class="text-amber-400">30 italic">// Exposed!
class="text-white/class="text-amber-400">30 italic">// DO this
class="text-pink-400">const apiKey = process.env.OLYMPUS_API_KEY;
class="text-white/class="text-amber-400">30 italic">// For production, use secrets managers
class="text-pink-400">import { SecretsManager } class="text-pink-400">from class="text-emerald-class="text-amber-400">400">'aws-sdk';
class="text-pink-400">const sm = class="text-pink-400">new SecretsManager();
class="text-pink-400">const apiKey = class="text-pink-400">await sm.getSecretValue({
SecretId: class="text-emerald-class="text-amber-400">400">'olympus/api-key'
}).promise();