Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

How do I connect the CMS to Front-end (Next)?

default discord avatar
taun21602 years ago
2

Hi. How do I connect the e-commerce template CMS repo to the Nextjs e-commerce front-end repo?



The only steps I've taken since cloning repos is adding my env details. I'm at square 1.



How do I connect the CMS to Front-end (Next)?



To use a CMS in a separate repo to the Next app, I have to deploy to servers at stage 1? I've been using the monorepo nextjs server wherein I can run the server locally... Can I do run locally when I use 2 different repos?

  • default discord avatar
    paulpopus2 years ago

    You can still run the CMS locally just on a separate port yes



    I think nextjs automatically picks the next available one (from a 3000 default) but with payload you can specify a different port for it to run on and then your cms is accessible on localhost:PORT



    the defaults in the .env.example in those templates should be enough



    are you able to run the CMS? if not, do you have any errors?

  • default discord avatar
    taun21602 years ago

    That worked, surprisingly well. Thanks Paul.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.