deploying react js front end w/ node js backend

It’s my first time trying to deploy an app. Is there documentation on how to deploy a react js front end with node js backend? I found documentation for node js but not react js.

There are frameworks that bundle all this together for you, but since you are asking about them separately I’m going to assume that you have a SPA react app (like those that used to be created by Create React Application), and a Node.js backend likely using express. Let me know if I got either of these assumptions wrong.

If the above is true, you likely develop running two servers, but your front end has a “build step” defined which will produce static assets.

If all of the above is true, then all that is needed to be done is have the backend “build” script defined in package.json to invoke the front end build script (as well as any backend build processes should you be using something like typescript). And for the output of the front-end build script to be placed where the express server will serve this content statically.

okay, thank you! Your assumptions were correct, I will look in the package.json to invoke the frontend build script.

is there any documentation to doing what you suggested? Struggling to find any on fly io

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.