File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const { createProxyMiddleware } = require ( 'http-proxy-middleware' ) ;
22
3- module . exports = function ( app , host = 'local' ) {
4- if ( host == 'local' ) {
5- app . use (
6- '/api' ,
7- createProxyMiddleware ( {
8- target : 'http://local:3001' ,
9- changeOrigin : true ,
10- } )
11- ) ;
12- } else {
13- app . use (
14- '/api' ,
15- createProxyMiddleware ( {
16- target : 'http://server:3001' ,
17- changeOrigin : true ,
18- } )
19- ) ;
20- }
3+ module . exports = function ( app ) {
4+ app . use (
5+ '/api' ,
6+ createProxyMiddleware ( {
7+ target : 'http://server:3001' ,
8+ changeOrigin : true ,
9+ } )
10+ ) ;
2111} ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import logger from '@shared/Logger';
88* Default values are hard coded here, but you may choose to store these values in a
99* config file or other mechanism
1010*/
11- const port = Number ( process . env . PORT || 3000 ) ;
11+ const port = Number ( process . env . PORT || 3001 ) ;
1212app . listen ( port , ( ) => {
1313 logger . info ( 'Express server started on port: ' + port ) ;
1414} ) ;
You can’t perform that action at this time.
0 commit comments