🔬🚧 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.
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
- Heroku
- git
- Node.js
- create-react-app
npm install -g create-react-app
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
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
…