Skip to content

Latest commit

 

History

History
73 lines (50 loc) · 1.69 KB

File metadata and controls

73 lines (50 loc) · 1.69 KB

Medusa v2 Example: Marketplace

This directory holds the code for the Marketplace recipe example.

You can either:

Installation

  1. Clone the repository and change to the marketplace directory:
git clone https://github.com/medusajs/examples.git
cd examples/marketplace

2. Rename the .env.template file to .env.

3. If necessary, change the PostgreSQL username, password, and host in the DATABASE_URL environment variable.

4. Install dependencies:

yarn # or npm install

5. Setup and seed the database:

npx medusa db:setup
yarn seed # or npm run seed

6. Start the Medusa application:

yarn dev # or npm run dev

Copy into Existing Medusa Application

If you have an existing Medusa application, copy the content of the following directories:

  1. src/modules/marketplace
  2. src/links
  3. src/workflows
  4. src/api

Then, add the Marketplace Module to medusa-config.js:

module.exports = defineConfig({
  // ...
  modules: [
    {
      resolve: "./modules/marketplace"
    }
  ]
})

Finally, run the migrations and sync links before starting the Medusa application:

npx medusa db:migrate

More Resources