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
1111REACT_APP_STRIPE_PUBLISH_KEY=pk_test_51H805Oa3n3j3JVXUotWOsdf223PXI2ZehJ0s4QSQK0WjEJer78w87wer8h2u3bo32sTVcxyh5bDuulBildNrp
1212REACT_APP_GOOGLE_AUTH_CLIENT_ID=23432543654-m4s23i3dsf72938gubrj32n8932ro9knqudv.apps.googleusercontent.com
1313REACT_APP_PORT=3000
14- REACT_APP_ENVIRONMENT=<prod/dev>
1514
15+ REACT_CLIENT_URL=http://localhost:3000
16+ REACT_APP_ENVIRONMENT=<prod/dev>
1617ACTIVE_PROFILE=<dev/prod>
18+
1719REDIS_PASSWORD=mypass
1820REDIS_PORT=6379
1921
Original file line number Diff line number Diff line change 11REACT_APP_STRIPE_PUBLISH_KEY=pk_test_5dsf4534jkmn4nm345QSQK0WjEJKx1PNH3mJxeUkA45345345Vcxyh5bDuulBildNrp3MWn005xEkAdJ4
2- REACT_APP_COMMON_DATA_SERVICE_IP=localhost
32REACT_APP_GOOGLE_AUTH_CLIENT_ID=357808142500-sdfsndln4oh5345435.apps.googleusercontent.com
3+
4+ # Add below ports if you are running on your machine
45REACT_APP_AUTHENTICATION_SERVICE_PORT=7000
56REACT_APP_PAYMENT_SERVICE_PORT=9050
67REACT_APP_COMMON_DATA_SERVICE_PORT=9000
78REACT_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.
813REACT_APP_AUTHENTICATION_SERVICE_URL=<URL of Auth Service>
914REACT_APP_COMMON_DATA_SERVICE_URL=<URL of Common Data Service>
1015REACT_APP_PAYMENT_SERVICE_URL=<URL of Payment Service>
1116REACT_APP_SEARCH_SUGGESTION_SERVICE_URL=<URL of Search Suggestion Service>
17+
1218REACT_APP_ENVIRONMENT=<prod/dev>
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ services:
1717 - spring-cloud-microservices
1818
1919 redis-cache :
20- image : redis:latest
20+ image : redis:alpine
2121 container_name : redis-cache-container
2222 command : redis-server --requirepass ${REDIS_PASSWORD}
2323 ports :
@@ -73,6 +73,7 @@ services:
7373 - REDIS_PASSWORD=${REDIS_PASSWORD}
7474 - REDIS_HOST=redis-cache
7575 - REDIS_PORT=${REDIS_PORT}
76+ - REACT_CLIENT_URL=${REACT_CLIENT_URL}
7677 links :
7778 - mysql-db:mysql
7879 expose :
Original file line number Diff line number Diff line change @@ -12,6 +12,6 @@ public class CommonDataServiceApplication {
1212
1313 public static void main (final String [] args ) {
1414 ConfigurableApplicationContext context = SpringApplication .run (CommonDataServiceApplication .class , args );
15- // context.getBean(CommonDataController.class).fillWithTestData();
15+ context .getBean (CommonDataController .class ).fillWithTestData ();
1616 }
1717}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class CorsConfig implements WebMvcConfigurer
1111{
1212 @ Override
1313 public void addCorsMappings (CorsRegistry registry ) {
14- registry .addMapping ("/**" ).allowedOrigins ("https://shoppers-ecom-app.herokuapp.com" )
14+ registry .addMapping ("/**" ).allowedOrigins (System . getenv ( "REACT_CLIENT_URL" ) )
1515 .allowedMethods ("GET" , "POST" );
1616 }
1717}
You can’t perform that action at this time.
0 commit comments