Options
Configure Nuxt Medusa easily with the medusa
property.
nuxt.config
export default { // Defaults options medusa: { baseUrl: 'http://localhost:9000', maxRetries: 3, global: true, server: false }}
For full configuration of @medusa/medusa-js
check out the documentation here.
baseUrl
- Default:
http://localhost:9000
The url to which requests are made to.
maxRetries
- Default:
3
The amount of times a request is retried.
global
- Default:
true
When set to true
it will register Medusa client globally through a plugin. Otherwise, first usage of useMedusaClient
or serverMedusaClient
will create a client and then use it from either the context or the event.
server
- Default:
false
When set to true
it will add a server utility serverMedusaClient
that allows to fetch data from Medusa from the server side.
apiKey
(Server only)
- Optional:
''
Optional API key used for authenticating admin requests, can be done from server or serverMedusaClient
only.
publishableApiKey
- Optional:
''
Optional publishable API key used for storefront requests.
Table of Contents