Skip to content

Commit

Permalink
Feat: add procfile and details for deploying to heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanCCollins committed Sep 5, 2016
1 parent 5ac156a commit d62e7a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node server.js
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Following the lead of the famous [React Boilerplate]() project, this starter pro
We incorporate an ESLint configuration and follow strictly the [AirBnb JS & JSX style guides](https://github.com/airbnb/javascript).

# What is Feature First?
In most projects and frameworks, files are organized in a File type first fashion. For example, your tests exist in a test folder, your styles in a styles folder. This boilerplate takes a different approach.
In most projects and frameworks, files are organized in a File type first fashion. For example, your tests exist in a test folder, your styles in a styles folder. This boilerplate takes a different approach.

We encourage encapsulation of features by asking that you organize each feature into a seperate folder (feature-first). In React, this means that your containers and components exist in their own folders, along with literally every other file that pertains to that one component. Your actions, reducers, tests, styles, and everything else are all internal to the component they represent. By decoupling your features from the rest of your app, you set yourself up to reuse your UI components in future projects. You can thank us later!

Expand Down Expand Up @@ -38,9 +38,9 @@ To try the example application out or to use the project, follow the instruction
Your app will be served at: http://0.0.0.0:1337/

## Deployment
In order to deploy the app, a demo express server setup has been included. If you peak inside the server folder, you will see an example setup. The public folder includes all of the files that are generated when running the: `npm run deploy` script. This includes the bundle.js, index.html and an app folder that includes all assets.
In order to deploy the app, a demo express server setup has been included. If you peak inside the server folder, you will see an example setup. The public folder includes all of the files that are generated when running the: `npm run deploy` script. This includes the production minified bundle.js, index.html and an app folder that includes all image assets.

The express server can be run with `npm run serve:bundle`. This will start a static express server and serve the generated assets, just like you would in production.
The express server can be run with `npm run serve:bundle`. This will start a static express server and serve the generated assets, just like you would in production. A Procfile is included, that will run the node server on [Heroku](https://heroku.com) automatically if you push your project to Heroku after running the `npm run deploy` command.

NOTE: the deployment script will place all your generated assets in the `server/public` folder, where they can be served in production.

Expand Down

0 comments on commit d62e7a3

Please sign in to comment.