More Premium Hugo Themes Premium Vue Themes

Medusa

Medusa module for Nuxt

Medusa

Medusa module for Nuxt

Author Avatar Theme by nuxt-modules
Github Stars Github Stars: 168
Last Commit Last Commit: Mar 4, 2025 -
First Commit Created: Dec 18, 2023 -
default image

Product Analysis: Nuxt Medusa

Overview

Nuxt Medusa is a module for Nuxt that provides a wrapper around @medusajs/medusa-js, allowing users to easily integrate Medusa functionalities into their Nuxt applications. With Nuxt Medusa, users can take advantage of handy composables like useMedusaClient and seamlessly fetch data from Medusa in their Nuxt projects.

Features

  • Nuxt 3 ready
  • Wrapper around @medusajs/medusa-js
  • Handy composables like useMedusaClient
  • Usage in API server routes with serverMedusaClient
  • TypeScript support

Installation

To set up Nuxt Medusa in your project, follow these steps:

  1. Add the nuxt-medusa dependency to your project.
  2. Add nuxt-medusa to the modules section of nuxt.config.ts.
  3. Create an .env file with the MEDUSA_URL variable.
  4. That’s it! You can now start fetching data from Medusa in your Nuxt project.

If you encounter problems with CORS from Medusa, ensure that process.env.STORE_CORS in the medusa-config.js file is pointing to your local Nuxt project. By default, Medusa has CORS set for http://localhost:8000, while Nuxt runs on http://localhost:3000 by default.

Summary

Nuxt Medusa is a powerful module for Nuxt that simplifies the integration of Medusa functionalities into Nuxt applications. With its intuitive setup process and handy composables, developers can seamlessly fetch data from Medusa and enhance their Nuxt projects.