Medusa v2 Example: Marketplace
This directory holds the code for the Marketplace recipe example.
You can either:
Installation
- 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
5. Setup and seed the database:
npx medusa db:setup
yarn seed
6. Start the Medusa application:
yarn dev
Copy into Existing Medusa Application
If you have an existing Medusa application, copy the content of the following directories:
src/modules/marketplace
src/links
src/workflows
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