Deploying Sanity to Heroku

5 replies
Last updated: Dec 3, 2020

Hi all, can someone help me deploying sanity to Heroku? 🙂

Dec 2, 2020, 5:49 PM

assuming you’re using express, i would use express’s


Dec 2, 2020, 10:25 PM


sanity build
on deploy and then use the express.static to point your index there

Dec 2, 2020, 10:26 PM

you’d also have to add redirects to resolve paths and point them back to the sanity single page app. i forget how to do that though.

Dec 2, 2020, 10:27 PM

though this works, i would advise against using heroku though if you can. sanity studio is just a single page app that doesn’t require you to host any server logic yourself so providers like netlify or vercel should be easier to set up

Dec 2, 2020, 10:30 PM
Dec 3, 2020, 12:17 PM Get the most out of your content is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Give your team exactly what they need to edit and publish their content with the customizable Sanity Studio. Get real-time collaboration out of the box. comes with a hosted datastore for JSON documents, query languages like GROQ and GraphQL, CDNs, on-demand asset transformations, presentation agnostic rich text, plugins, and much more.

Don't compromise on developer experience. Join thousands of developers and trusted companies and power your content with Free to get started, pay-as-you-go on all plans.