mercurjs / mercur

JavaScript Open Source
Multi-Vendor Marketplace Accelerator build on top of Medusa.js. Mercur simplifies the path to your own customized, multi-vendor marketplace.
https://mercurjs.com
MIT License
198 stars 23 forks source link

Deploying this #20

Open haf opened 2 months ago

haf commented 2 months ago

What's the recommended way of deploying this?

medusa-vendor build generates build-vendor in the ./api folder; but I don't want to deploy the dev server in prod... Is there an equivalent index.js file as medua has?

vholik commented 2 months ago

The general admin deployment guide of Medusa also applies to the vendor panel. The only differences are that output directory would be build-vendor not build and build command is yarn build:vendor. Hope it helps

haf commented 2 months ago

Thanks. I’ve read that but what confuses me is what server serves it and how that server can substitute the env var mentioned in the guide.

In the case of Medusa there’s an index.js file acting as the server but I can’t find one for Mercur?

haf commented 2 months ago

Ping

vholik commented 2 months ago

Let me clarify everything. index.js is Medusa's entry file for running only backend, if you are using it you should serve admin and vendor panel seperately from build and build-vendor folder. Hope it helps

haf commented 2 months ago

Specifically, what's the command to run to serve build-vendor?

vholik commented 2 months ago

In development mode it's yarn dev:vendor. In production you can use nginx or if you want go for simpler solution you can use Vercel.