👀 See Sanity in action: Watch product demo now →

Using Two Frontends with a Headless CMS

1 replies
Last updated: Jul 10, 2020
user R
Yes, you are right as far as 2 frontends. I see now that a great way to set it up is keep the studio at top level, then mix in the
directory for vercel serverless functions, and use the
vercel dev
command which lets you dev both at once. 👍
Jul 9, 2020, 8:09 PM
In case this helps anyone else: I found a great way to do this is that the Next and Sanity projects both contain the required
script that passes $PORT for vercel, then each has a yarn start command for local dev that runs
vercel dev —port [x]
where x is a different port for each project.
This allows full development of Next and Sanity with serverless at the same time.
Jul 10, 2020, 1:46 PM

Sanity.io – build remarkable experiences at scale

Sanity is a customizable solution that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Categorized in