File tree Expand file tree Collapse file tree 5 files changed +14
-5
lines changed
server/common-data-service/src/main/java/com/ujjaval/ecommerce/commondataservice Expand file tree Collapse file tree 5 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,11 @@ DB_PASS=mypass
11
11
REACT_APP_STRIPE_PUBLISH_KEY=pk_test_51H805Oa3n3j3JVXUotWOsdf223PXI2ZehJ0s4QSQK0WjEJer78w87wer8h2u3bo32sTVcxyh5bDuulBildNrp
12
12
REACT_APP_GOOGLE_AUTH_CLIENT_ID=23432543654-m4s23i3dsf72938gubrj32n8932ro9knqudv.apps.googleusercontent.com
13
13
REACT_APP_PORT=3000
14
- REACT_APP_ENVIRONMENT=<prod/dev>
15
14
15
+ REACT_CLIENT_URL=http://localhost:3000
16
+ REACT_APP_ENVIRONMENT=<prod/dev>
16
17
ACTIVE_PROFILE=<dev/prod>
18
+
17
19
REDIS_PASSWORD=mypass
18
20
REDIS_PORT=6379
19
21
Original file line number Diff line number Diff line change 1
1
REACT_APP_STRIPE_PUBLISH_KEY=pk_test_5dsf4534jkmn4nm345QSQK0WjEJKx1PNH3mJxeUkA45345345Vcxyh5bDuulBildNrp3MWn005xEkAdJ4
2
- REACT_APP_COMMON_DATA_SERVICE_IP=localhost
3
2
REACT_APP_GOOGLE_AUTH_CLIENT_ID=357808142500-sdfsndln4oh5345435.apps.googleusercontent.com
3
+
4
+ # Add below ports if you are running on your machine
4
5
REACT_APP_AUTHENTICATION_SERVICE_PORT=7000
5
6
REACT_APP_PAYMENT_SERVICE_PORT=9050
6
7
REACT_APP_COMMON_DATA_SERVICE_PORT=9000
7
8
REACT_APP_SEARCH_SUGGESTION_SERVICE_PORT=10000
9
+ REACT_APP_COMMON_DATA_SERVICE_IP=localhost
10
+
11
+ # Add URL if you dont want to use port.
12
+ # Higher priority is given to URL over PORTs.
8
13
REACT_APP_AUTHENTICATION_SERVICE_URL=<URL of Auth Service>
9
14
REACT_APP_COMMON_DATA_SERVICE_URL=<URL of Common Data Service>
10
15
REACT_APP_PAYMENT_SERVICE_URL=<URL of Payment Service>
11
16
REACT_APP_SEARCH_SUGGESTION_SERVICE_URL=<URL of Search Suggestion Service>
17
+
12
18
REACT_APP_ENVIRONMENT=<prod/dev>
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ services:
17
17
- spring-cloud-microservices
18
18
19
19
redis-cache :
20
- image : redis:latest
20
+ image : redis:alpine
21
21
container_name : redis-cache-container
22
22
command : redis-server --requirepass ${REDIS_PASSWORD}
23
23
ports :
@@ -73,6 +73,7 @@ services:
73
73
- REDIS_PASSWORD=${REDIS_PASSWORD}
74
74
- REDIS_HOST=redis-cache
75
75
- REDIS_PORT=${REDIS_PORT}
76
+ - REACT_CLIENT_URL=${REACT_CLIENT_URL}
76
77
links :
77
78
- mysql-db:mysql
78
79
expose :
Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ public class CommonDataServiceApplication {
12
12
13
13
public static void main (final String [] args ) {
14
14
ConfigurableApplicationContext context = SpringApplication .run (CommonDataServiceApplication .class , args );
15
- // context.getBean(CommonDataController.class).fillWithTestData();
15
+ context .getBean (CommonDataController .class ).fillWithTestData ();
16
16
}
17
17
}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class CorsConfig implements WebMvcConfigurer
11
11
{
12
12
@ Override
13
13
public void addCorsMappings (CorsRegistry registry ) {
14
- registry .addMapping ("/**" ).allowedOrigins ("https://shoppers-ecom-app.herokuapp.com" )
14
+ registry .addMapping ("/**" ).allowedOrigins (System . getenv ( "REACT_CLIENT_URL" ) )
15
15
.allowedMethods ("GET" , "POST" );
16
16
}
17
17
}
You can’t perform that action at this time.
0 commit comments