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
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
Make sure the Medusa Server is running after that it's time to start the Next.js server.
npm run dev
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)