DEV Community

Cover image for Whats Medusa an introduction part 2 Next.js storefront
Norbert Fuhs
Norbert Fuhs

Posted on

Whats Medusa an introduction part 2 Next.js storefront

As we know from part 1 of this series Part 1 Medusajs itself is based on 3 components:

Medusa Server
Admin Dashboard
Storefront

Now we will take a look at howto install and deploy a Storefront based on Next.js. We will start by creating a new Next.js project using the Medusa starter template.

npx create-next-app -e https://github.com/medusajs/nextjs-starter-medusa my-medusa-storefront

Enter fullscreen mode Exit fullscreen mode

Next we change in to the newly created directory my-medusa-storefront and rename the template environment file:

cd my-medusa-storefront
mv .env.template .env.local
Enter fullscreen mode Exit fullscreen mode

Make sure the Medusa Server is running after that it's time to start the Next.js server.

npm run dev
Enter fullscreen mode Exit fullscreen mode

Your new Next.js based storefront is running on https://localhost:8000.

Thats it for this part of the series in the next part we will take a look at customisation of the storefront and learn more about using APIs.

Stay tuned and don't forget to follow me on Twitter.

Top comments (0)