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.

Running 2 servers at the same time

default discord avatar
taun2160last year
5

Hi. How can I run the Payload server as well as the Nextjs server locally, simultaneously?



host:3000 & 4000



I'd like to fetch Payload data for Nextjs server.

  • discord user avatar
    seanzubrickas
    last year

    Hey

    @479030528084017165

    are you using one of our frontend repos?

  • default discord avatar
    christopher.nowlanlast year
    @479030528084017165

    yes. I usually have nextjs and payload in two separate repositories. I run PayloadCMS on port 8000 and Next JS on Port 3000

  • default discord avatar
    taun2160last year

    Thanks. How do you run them together? When I run another one on a different port the other server stops (I guess it stops when I close VSCode and open the other repo? Sounds illogical?)

  • discord user avatar
    seanzubrickas
    last year

    What you should do is have two terminal consoles open in VSCode, one in your root directory for the frontend, one in the root of the backend, and then you can run them simultaneously

  • default discord avatar
    christopher.nowlanlast year
    @479030528084017165

    what

    @364562745447940099

    is correct.

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.