File tree Expand file tree Collapse file tree 3 files changed +6585
-2528
lines changed Expand file tree Collapse file tree 3 files changed +6585
-2528
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 0.3.0" ,
4
4
"private" : true ,
5
5
"dependencies" : {
6
- "netlify-lambda" : " ^0.4.0" ,
7
- "react" : " ^16.3.1" ,
8
- "react-dom" : " ^16.3.1" ,
9
- "react-scripts" : " 1.1.4"
6
+ "react" : " ^16.5.2" ,
7
+ "react-dom" : " ^16.5.2" ,
8
+ "react-scripts" : " 2.0.4"
10
9
},
11
10
"scripts" : {
12
11
"start" : " run-p start:**" ,
15
14
"build" : " run-p build:**" ,
16
15
"build:app" : " react-scripts build" ,
17
16
"build:lambda" : " netlify-lambda build src/lambda" ,
18
- "test" : " react-scripts test --env=jsdom " ,
17
+ "test" : " react-scripts test" ,
19
18
"eject" : " react-scripts eject"
20
19
},
21
- "proxy" : {
22
- "/.netlify/functions" : {
23
- "target" : " http://localhost:9000" ,
24
- "pathRewrite" : {
25
- "^/\\ .netlify/functions" : " "
26
- }
27
- }
20
+ "eslintConfig" : {
21
+ "extends" : " react-app"
28
22
},
23
+ "browserslist" : [
24
+ " >0.2%" ,
25
+ " not dead" ,
26
+ " not ie <= 11" ,
27
+ " not op_mini all"
28
+ ],
29
29
"devDependencies" : {
30
- "npm-run-all" : " ^4.1.3"
30
+ "http-proxy-middleware" : " ^0.19.0" ,
31
+ "npm-run-all" : " ^4.1.3" ,
32
+ "netlify-lambda" : " ^0.4.0"
31
33
}
32
34
}
Original file line number Diff line number Diff line change
1
+ const proxy = require ( 'http-proxy-middleware' ) ;
2
+
3
+ module . exports = function ( app ) {
4
+ app . use ( proxy ( '/.netlify/functions/' , {
5
+ target : 'http://localhost:9000/' ,
6
+ "pathRewrite" : {
7
+ "^/\\.netlify/functions" : ""
8
+ }
9
+ } ) ) ;
10
+ } ;
You can’t perform that action at this time.
0 commit comments