Skip to content
This repository was archived by the owner on Jun 11, 2022. It is now read-only.

mars/create-react-app-buildpack

 
 

Repository files navigation

Heroku Buildpack for create-react-app

🔬🚧 This is an experimental branch to reimplement this buildpack with a pure Node server, avoiding the confusion (1, 2, 3…) of original version caused by using a static web server (Nginx) for the runtime.

In its current state, this branch will deploy a create-react-app project like the original (master branch), but is missing customization features.

Roadmap

This buildpack will deploy a create-react-app project with zero-config required. All customization will be performed by the developer creating & committing their own Node server/index.js with code-based customizations. static.json will no longer have any effect on the runtime.

  • Setup acceptance testing
  • Support custom server/index.js
  • Example: Routing
  • Example: HTTPS-only
  • Example: Proxy
  • Support dynamic templates public/index.ejs
  • Example: Runtime environment vars
  • Document Procfile customization

Requires

Quick Start

Ensure requirements are met, then execute the following in a terminal.

✏️ Replace $APP_NAME with a name for your unique app.

create-react-app $APP_NAME
cd $APP_NAME
git init
heroku create $APP_NAME --buildpack https://github.com/mars/create-react-app-buildpack.git#pure-node
git add .
git commit -m "🌱 create-react-app"
git push heroku master
heroku open

Custom Node server

All customizations to the runtime of this buildpack are enabled by adding a Node server to the app, and then the server can be customized to do pretty much anything you can program in javascript. To enable a custom server, the app layout must be re-arranged to:

package.json
react-ui/
  package.json
  …
server/
  index.js
  …

About

⚛️ Heroku Buildpack for create-react-app: static hosting for React.js web apps

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages