Code Monkey home page Code Monkey logo

medusa-express-nextjs's Introduction

Medusa

Medusa Express

Medusa is an open-source headless commerce engine that enables developers to create amazing digital commerce experiences.

Medusa is released under the MIT license. PRs welcome! Discord Chat Follow @medusajs


Built with

Medusa: Commerce engine

Next.js: React framework

Stripe: Payment provider

Medusa React: Hooks and components for Medusa


Prerequisites: To use Medusa Express, you need a Medusa server. Check out medusa-starter-default for a quick setup.


๐Ÿš€ Get started!

1. Create your Medusa Express project

Use npx and select medusa.express (recommended)

  npx create-medusa-app@latest

Use git clone

  git clone --depth=1 https://github.com/medusajs/medusa-express-nextjs medusa-express

2. Navigate to project and install dependencies

  cd <your-express-folder>
  
  yarn
  # or
  npm install

3. Link your Medusa server

In your project, you should have a .env.template file with the following content:

NEXT_PUBLIC_MEDUSA_BACKEND_URL=http://localhost:9000

Copy the template into a file used for local development:

mv .env.template .env.local

Add Stripe API key as environment variable to complete orders:

# Stripe key is required for completing orders
NEXT_PUBLIC_STRIPE_API_KEY=pk_test_... 

Your Medusa server runs locally on port 9000 by default. Make sure to update the above environment variable, if you've changed the port.

4. Try it out!

Start up both your Medusa server and Medusa Express and try it out!

Medusa Express is running at http://localhost:8000!

Important: Medusa Express requires existing product. Either seed your Medusa server with some dummy products, or create your own through Medusa Admin.

medusa-express-nextjs's People

Contributors

olivermrbl avatar srindom avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.