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 33 "version" : " 0.1.0" ,
44 "private" : true ,
55 "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" ,
611 "react" : " ^15.4.2" ,
712 "react-dom" : " ^15.4.2"
813 },
914 "devDependencies" : {
15+ "babel-watch" : " ^2.0.6" ,
16+ "concurrently" : " ^3.4.0" ,
1017 "react-scripts" : " 0.9.4"
1118 },
19+ "proxy" : " http://localhost:8081" ,
1220 "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\" " ,
1423 "build" : " react-scripts build" ,
1524 "test" : " react-scripts test --env=jsdom" ,
1625 "eject" : " react-scripts eject"
26+ },
27+ "babel" : {
28+ "presets" : [
29+ " es2015" ,
30+ " stage-2"
31+ ]
1732 }
18- }
33+ }
You can’t perform that action at this time.
0 commit comments