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.

Next.js + Payload cms Local API Vercel deployment

default discord avatar
p.s.nikhillast year
2

How do i make use of local API and deploy both frontend and expresss app (payload cms) together



Any starter template ?



Or should i deploy it seperatly and use Rest API

  • default discord avatar
    nballlast year

    Local API works when CMS and front end are colocated. Like this:

    https://github.com/payloadcms/nextjs-custom-server


    Else use REST or GraphQL for separated front and back ends. For example when hosting Nextjs with Vercel and using Payload Cloud.



    There is also a Serverless option which I think is fairly recent. That allows you to colocate on Vercel, although you still need to set up mongo DB Atlas, etc.



    https://github.com/payloadcms/next-payload


    Sure enough, the next-payload option allows local API. And I need to try that!

  • default discord avatar
    .lucascamargolast year

    Admin route does not work with the application in production hosted on vercel. I'm using custom-server. Locally it works, in prod it doesn't.

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..