You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 11, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+20-14Lines changed: 20 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,16 @@ To try the example application out or to use the project, follow the instruction
35
35
36
36
npm run start
37
37
38
-
Development server should be running at http://localhost:8080/
38
+
Your app will be served at:http://0.0.0.0:1337/
39
39
40
-
4.**Make build**
40
+
## Deployment
41
+
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.
41
42
42
-
npm run build
43
+
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.
43
44
44
-
### File Structure
45
+
NOTE: the deployment script will place all your generated assets in the `server/public` folder, where they can be served in production.
46
+
47
+
## File Structure
45
48
* Some files left out for brevity. Please reference the files in the [Scalable React Boilerplate](https://github.com/RyanCCollins/feature-first-react-boilerplate) project for an example of the file structure. The application will ultimately be in use in a production web application project and more info will be posted here when we have production level examples.
46
49
```
47
50
.
@@ -88,30 +91,31 @@ To try the example application out or to use the project, follow the instruction
88
91
89
92
## Scripts
90
93
-**npm run setup**
91
-
92
-
Installs the application's dependencies
94
+
+ Installs the application's dependencies
93
95
94
96
-**npm run test**
97
+
+ Runs unit tests
95
98
96
-
Runs unit tests
97
99
-**npm run test:watch**
100
+
+ Watches for changes to run unit tests
98
101
99
-
Watches for changes to run unit tests
100
102
-**npm run build**
103
+
+ Bundles the application
101
104
102
-
Bundles the application
103
105
-**npm run dev**
106
+
+ Starts webpack development server
104
107
105
-
Starts webpack development server
106
108
-**npm run lint**
109
+
+ Runs the linter
107
110
108
-
Runs the linter
109
111
-**npm run deploy**
112
+
+ Creates the production ready files within the `/server/public` folder
110
113
111
-
Creates the production ready files
112
114
-**npm run clean**
115
+
+ Removes the bundled code and the production ready files
113
116
114
-
Removes the bundled code and the production ready files
117
+
-**npm run serve:bundle**
118
+
+ Serve production assets from the `/server/public` folder.
115
119
116
120
## Generators
117
121
The boilerplate contains generators for easy project scaffolding. At the moment, the generator has the following scaffold generating commands built in:
@@ -150,7 +154,7 @@ where <type_of_component> is one of: component, container or page.
150
154
151
155
The generators use the same feature-first file organization as the rest of the project, encapsulating components within their own folder.
152
156
153
-
####**Gotchas**
157
+
### **Gotchas**
154
158
In order to get the import / export to work, the generator does some pattern matching of the comments in the files to place the new imports. Just don't delete the comments within the root level index.js file in each directory and things will work fine!
155
159
156
160
From `app/src/container/index.js` or `app/src/component/index.js`
@@ -221,6 +225,8 @@ which will pick up any file with the .test.js postfix and run it through Karma /
221
225
*[x] Add [Grommet](grommet.io) as an optional starter component library
222
226
*[x] Add Webpack stats plugin
223
227
*[x] Dogfood the project and iterate on suggestions
0 commit comments