Skip to content

🛠 A boilerplate to show how to serve create-react-app with node server for injecting server data dynamically into page and securing API without login authentication.

just4fun/cra-node-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What

A boilerplate to show how to serve create-react-app with node server for injecting server data dynamically into page and securing API without login authentication.

When

  • If you want to build a lightweight app
  • If you want to deploy create-react-app without static server but dynamic one
  • If you want to inject server data dynamically into page
  • If your app doesn't have login feature (to get something like JWT token) but you want to secure non-GET APIs

When not

  • If you need to support SSR (you can try next.js)

Development

yarn dev

Note: Client and server will be started via two servers (webpack and node) in DEV mode.

Deployment

Heroku

  1. Choose heroku/nodejs as buildpack
  2. Add following script in your package.json

heroku_postbuild

Last

Enjoy.

About

🛠 A boilerplate to show how to serve create-react-app with node server for injecting server data dynamically into page and securing API without login authentication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published