File tree Expand file tree Collapse file tree 3 files changed +5628
-2
lines changed Expand file tree Collapse file tree 3 files changed +5628
-2
lines changed Original file line number Diff line number Diff line change
1
+ import compression from 'compression' ;
2
+ import express from 'express' ;
3
+
4
+ const app = express ( ) ;
5
+ const port = process . env . PORT || 8080 ;
6
+ app . use ( compression ( ) ) ;
7
+
8
+ app . use ( express . static ( './build' ) ) ;
9
+
10
+ app . listen ( port , ( err ) => {
11
+ if ( err ) {
12
+ console . log ( err ) ;
13
+ return ;
14
+ }
15
+ console . log ( `Server is live at http://localhost:${ port } ` ) ;
16
+ } ) ;
Original file line number Diff line number Diff line change 3
3
"version" : " 0.1.0" ,
4
4
"private" : true ,
5
5
"dependencies" : {
6
+ "babel-cli" : " ^6.23.0" ,
7
+ "babel-preset-es2015" : " ^6.22.0" ,
8
+ "babel-preset-stage-2" : " ^6.22.0" ,
9
+ "compression" : " ^1.6.2" ,
10
+ "express" : " ^4.15.2" ,
6
11
"react" : " ^15.4.2" ,
7
12
"react-dom" : " ^15.4.2"
8
13
},
9
14
"devDependencies" : {
15
+ "babel-watch" : " ^2.0.6" ,
16
+ "concurrently" : " ^3.4.0" ,
10
17
"react-scripts" : " 0.9.4"
11
18
},
19
+ "proxy" : " http://localhost:8081" ,
12
20
"scripts" : {
13
- "start" : " react-scripts start" ,
21
+ "bluemix" : " babel-node index.js" ,
22
+ "start" : " concurrently \" PORT=8080 react-scripts start\" \" PORT=8081 babel-watch index.js\" " ,
14
23
"build" : " react-scripts build" ,
15
24
"test" : " react-scripts test --env=jsdom" ,
16
25
"eject" : " react-scripts eject"
26
+ },
27
+ "babel" : {
28
+ "presets" : [
29
+ " es2015" ,
30
+ " stage-2"
31
+ ]
17
32
}
18
- }
33
+ }
You can’t perform that action at this time.
0 commit comments