docs: document admin environment variables (#11313)
This commit is contained in:
@@ -48,8 +48,8 @@ For admin customizations, create this file at `src/admin/lib/config.ts`.
|
||||
import Medusa from "@medusajs/js-sdk"
|
||||
|
||||
export const sdk = new Medusa({
|
||||
baseUrl: "http://localhost:9000",
|
||||
debug: process.env.NODE_ENV === "development",
|
||||
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
|
||||
debug: import.meta.env.DEV,
|
||||
auth: {
|
||||
type: "session",
|
||||
},
|
||||
@@ -78,6 +78,12 @@ export const sdk = new Medusa({
|
||||
</CodeTab>
|
||||
</CodeTabs>
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
In the Medusa Admin you use `import.meta.env` to access environment variables becaues the Medusa Admin is built on top of [Vite](https://vitejs.dev/). Learn more in [this documentation](!docs!/learn/fundamentals/admin/environment-variables).
|
||||
|
||||
</Note>
|
||||
|
||||
### JS SDK Configurations
|
||||
|
||||
The `Medusa` initializer accepts as a parameter an object with the following properties:
|
||||
|
||||
Reference in New Issue
Block a user