vladimirp
vladimirp

Reputation: 1554

Can I use reactstarterkit.com for building client side react app not served from node.js?

As I can tell react starter kit (reactstarterkit.com) is intended to be served from node.js and developed further into full stack JavaScript app. Can I use it only for developing pure client side react app?

Upvotes: 1

Views: 308

Answers (1)

Konstantin Tarkus
Konstantin Tarkus

Reputation: 38428

Yes, but you would need to modify the build process to make it generate static .html pages similar to how it's implemented in react-static-boilerplate by the same author.

You may want to keep all existing build scripts in case you need to switch back to a full-stack Node.js/React app, but just add a support of building only static portion of the site by appending --static flag to the build command (npm run build -- --static or npm start -- --static). With this flag there will be an additional build step which traverses all the routes and generates static .html pages, or if you don't care about SEO it can generate a single index.html page in the root of the build output folder and make your static site serve this page for all HTTP requests.

Upvotes: 3

Related Questions