@vymalo/medusa-marketplace
v0.0.2
Published
A starter for Medusa projects.
Maintainers
Readme
Medusa v2 Example: Marketplace
This directory holds the code for the Marketplace recipe example.
You can either:
- install and use it as a Medusa application;
- or copy its source files into an existing Medusa application.
Installation
- Clone the repository and change to the
marketplacedirectory:
git clone https://github.com/medusajs/examples.git
cd examples/marketplace2. 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 install5. Setup and seed the database:
npx medusa db:setup
yarn seed # or npm run seed6. Start the Medusa application:
yarn dev # or npm run devCopy into Existing Medusa Application
If you have an existing Medusa application, copy the content of the following directories:
src/modules/marketplacesrc/linkssrc/workflowssrc/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:migrateMore Resources
- OpenAPI Spec file: Can be imported into tools like Postman to view and send requests to this project's API routes.
- Medusa Documentation
