- @medusajs/medusa-cli@1.1.2 - medusa-core-utils@1.1.1 - medusa-dev-cli@0.0.2 - medusa-file-spaces@1.1.4 - medusa-fulfillment-manual@1.1.1 - medusa-fulfillment-webshipper@1.1.4 - medusa-interfaces@1.1.2 - medusa-payment-adyen@1.1.4 - medusa-payment-klarna@1.1.5 - medusa-payment-paypal@1.0.4 - medusa-payment-stripe@1.1.4 - medusa-plugin-add-ons@1.1.4 - medusa-plugin-brightpearl@1.1.6 - medusa-plugin-contentful@1.1.5 - medusa-plugin-economic@1.1.4 - medusa-plugin-mailchimp@1.1.4 - medusa-plugin-permissions@1.1.4 - medusa-plugin-segment@1.1.6 - medusa-plugin-sendgrid@1.1.5 - medusa-plugin-slack-notification@1.1.4 - medusa-plugin-twilio-sms@1.1.4 - medusa-plugin-wishlist@1.1.4 - medusa-test-utils@1.1.4 - @medusajs/medusa@1.1.12
Medusa
Medusa is a headless commerce engine built with Node.js using Express with a Postgresql database.
Documentation
See Medusa Commerce API docs for Node.js.
Get started in less than 5 minutes
You can get a Medusa engine up and running in your local development environment within a couple of minutes. Perform the following steps:
-
Install Medusa, the Medusa CLI, Medusa babel preset and Medusa interfaces
# core medusa npm install @medusajs/medusa yarn add @medusajs/medusa # CLI npm install -g @medusa/medusa-cli yarn add global @medusajs/medusa-cli # babel preset npm install babel-preset-medusa-package yarn add babel-preset-medusa-package # interfaces npm install medusa-interfaces yarn add medusa-interfaces -
Create a file
medusa-config.jsat the root level of your Node.js project and fill in required settings// CORS to avoid issues when consuming Medusa from a client const STORE_CORS = "http://localhost:8000"; // Database URL (here we use a local database called medusa-development) const DATABASE_URL = "postgres://localhost/medusa-development"; // Medusa uses Redis, so this needs configuration as well const REDIS_URL = "redis://localhost:6379" // This is the place to include plugins. See API documentation for a thorough guide on plugins. const plugins = []; module.exports = { projectConfig: { redis_url: REDIS_URL, database_url: DATABASE_URL, database_logging: true, database_extra: process.env.NODE_ENV === "production" || process.env.NODE_ENV === "staging" ? { ssl: { rejectUnauthorized: false }, } : {}, database_type: "postgres", store_cors: STORE_CORS, }, plugins, }; -
Create a Medusa user, such that you can perform authenticated calls
# provide email and password to the command medusa user -e lebron@james.com -p lebronjames123 -
Start your Medusa engine in your local environment
medusa develop -
Open any client or API tool to start using your Medusa engine
Medusa is running at
http://localhost:4000. You should now investigate our API docs to start playing around with your new headless commerce engine.
After these four steps and only a couple of minutes, you now have a complete commerce engine running locally.
Contribution
Medusa is all about the community. Therefore, we would love for you to help us build the most robust and powerful commerce engine on the market. Whether its fixing bugs, improving our documentation or simply spreading the word, please feel free to join in.
Repository structure
The Medusa repository is a mono-repository managed using Lerna. Lerna allows us to have all Medusa packages in one place, and still distribute them as separate NPM packages.
Licensed
Licended under the MIT License