docs: generate API reference for 2.12.3 (#14341)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import Medusa from "@medusajs/js-sdk"
|
||||
|
||||
let MEDUSA_BACKEND_URL = "http://localhost:9000"
|
||||
|
||||
if (process.env.NEXT_PUBLIC_MEDUSA_BACKEND_URL) {
|
||||
MEDUSA_BACKEND_URL = process.env.NEXT_PUBLIC_MEDUSA_BACKEND_URL
|
||||
}
|
||||
|
||||
export const sdk = new Medusa({
|
||||
baseUrl: MEDUSA_BACKEND_URL,
|
||||
debug: process.env.NODE_ENV === "development",
|
||||
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
|
||||
})
|
||||
|
||||
sdk.store.locale.list()
|
||||
.then(({ locales }) => {
|
||||
console.log(locales)
|
||||
})
|
||||
@@ -0,0 +1,2 @@
|
||||
curl '{backend_url}/store/locales' \
|
||||
-H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
Reference in New Issue
Block a user