Search code examples
reactjsherokustrapi

Strapi & front end (react) hosting


I am looking to make a strapi (headless CMS) and react app and I can find some tutorials about it online, but I can't find much about the best or affordable hosting options.

Do I need to host the two separately? Or can I host them together? For instance, if I use heroku, can I host them in the same Dyno?

To be clear, I would like to host the Strapi back end and the react front end in the same place. Is that possible?


Solution

  • The best solution is to host your back-end application (in this case Strapi) in one server.

    And you have to host the build of your front-end application (in this case React) in a CDN.

    With this way you can manage precisely resources your allocate to each part of your application.

    After that if you want to host your application in the same server, you can use the public folder that offer Strapi. BUT IT S NOT A GOOD PRACTICE!