DEV Community

Nazim Boudeffa
Nazim Boudeffa

Posted on • Edited on

3

Testing Features of Medusa

I've started to code a marketplace with Next and I have started to learn some of the plugins of medusajs on my way to that objective

BTW I wish I can succeed because sometimes I just want to giveup, it's not easy but as an old gamedev I can make things be fun

So I've created a repository called nextjs-marketplace-medusa

Then npx create-next-app@latest --typescript

Then just install and configure TailWind

After that actually I use to tests some code about fetching the products

I use to code on Windows

So I have created a medusa server on an Ubuntu Desktop (actually 22.04) with VirtualBox

Installed Redis and Postgres like explained on the medusajs documentation site https://docs.medusajs.com

Image description

Image description

Image description

This server has an URL that I access from the Next app by changing the server's CORS to http://localhost:3000 even if I can just launch the Next app with changing the port to 8000, why? It's just to understand the CORS feature and let port 8000 as is for the Next Starter

I add a .env file to the app with the URL to the Ubuntu medusa server NEXT_PUBLIC_MEDUSA_BACKEND_URL="http://192.168.0.45:9000" and that's it

It works !

Image description

Next step is to separate the test that I do on the endpoint from the marketplace to a repository called nextjs-tests-medusa

This approach allows to separate the medusa server from Windows in a VirtualBox and let to install multiple ones to work on the marketplace

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more