File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 11import compression from 'compression' ;
22import express from 'express' ;
33import fs from 'fs' ;
4+ import path from 'path' ;
45import request from 'request' ;
56
67const app = express ( ) ;
78const port = process . env . PORT || 8080 ;
89app . use ( compression ( ) ) ;
910
1011let keys ;
11- if ( fs . existsSync ( '. /keys.json') ) {
12- keys = require ( '. /keys.json') ;
12+ if ( fs . existsSync ( path . join ( __dirname , ' /keys.json') ) ) {
13+ keys = require ( path . join ( __dirname , ' /keys.json') ) ;
1314} else {
1415 keys = JSON . parse ( process . env . VCAP_SERVICES ) [ 'user-provided' ] [ 0 ] . credentials ;
1516}
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ applications:
66 disk_quota : 256MB
77 memory : 128MB
88 services :
9- - keys
9+ - keys
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ applications:
66 disk_quota : 256MB
77 memory : 128MB
88 services :
9- - keys
9+ - keys
Original file line number Diff line number Diff line change 11{
22 "name" : " create-react-app-devops" ,
3- "version" : " 0 .1.0" ,
3+ "version" : " 1 .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" ,
96 "compression" : " ^1.6.2" ,
107 "express" : " ^4.15.2" ,
118 "react" : " ^15.4.2" ,
129 "react-dom" : " ^15.4.2" ,
1310 "request" : " ^2.80.0"
1411 },
1512 "devDependencies" : {
13+ "babel-cli" : " ^6.23.0" ,
14+ "babel-preset-es2015" : " ^6.22.0" ,
15+ "babel-preset-stage-2" : " ^6.22.0" ,
1616 "babel-watch" : " ^2.0.6" ,
1717 "concurrently" : " ^3.4.0" ,
1818 "react-scripts" : " 0.9.4"
1919 },
2020 "proxy" : " http://localhost:8081" ,
2121 "scripts" : {
22- "bluemix" : " babel- node index.js" ,
22+ "bluemix" : " node build/ index.js" ,
2323 "start" : " concurrently \" PORT=8080 react-scripts start\" \" PORT=8081 babel-watch index.js\" " ,
24- "build" : " react-scripts build" ,
24+ "build" : " react-scripts build && babel index.js -d build " ,
2525 "test" : " react-scripts test --env=jsdom" ,
2626 "eject" : " react-scripts eject"
2727 },
You can’t perform that action at this time.
0 commit comments