summaryrefslogtreecommitdiff
path: root/storefront/lib/medusa-client.js
diff options
context:
space:
mode:
Diffstat (limited to 'storefront/lib/medusa-client.js')
-rw-r--r--storefront/lib/medusa-client.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/storefront/lib/medusa-client.js b/storefront/lib/medusa-client.js
new file mode 100644
index 0000000..0b78f76
--- /dev/null
+++ b/storefront/lib/medusa-client.js
@@ -0,0 +1,6 @@
+import Medusa from "@medusajs/medusa-js"
+
+const BACKEND_URL = process.env.NEXT_PUBLIC_MEDUSA_BACKEND_URL || "http://localhost:9000"
+
+export const medusaClient = new Medusa({ baseUrl: BACKEND_URL, maxRetries: 3 })
+