<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Deployemnt of Angular6 &amp; NodeJS app  on Cloud Foundary in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/deployemnt-of-angular6-nodejs-app-on-cloud-foundary/m-p/763543#M37233</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I have an Angular 6 application which is communicating to Node services. I have deployed both app (Angular &amp;amp; Node app) to cloud foundary. On SCP, both app are residing in a common space, but source code are inside diffrent folders. In the cockpit, i can see two diffrent apps. After deploying both the app, i ran a command i.e. "cf apps" which is giving me 2 diffrent url for both applications.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Angular: &lt;A href="https://simple-crud-app.cfapps.eu10.hana.ondemand.com/" target="test_blank"&gt;https://simple-crud-app.cfapps.eu10.hana.ondemand.com/&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Node: &lt;A href="https://simplehttpserver-zany-giraffe.cfapps.eu10.hana.ondemand.com/" target="test_blank"&gt;https://simplehttpserver-zany-giraffe.cfapps.eu10.hana.ondemand.com/&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;When i am running angular url in browser, it is giving me CORS error because both application is running on diffrent urls.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Error: Access to XMLHttpRequest at 'https://simplehttpserver-zany-giraffe.cfapps.eu10.hana.ondemand.com/' from origin 'https://simple-crud-app.cfapps.eu10.hana.ondemand.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;For angular app, i am using "staticfile_buildpack" in the manifest.yml file and for node app i am using "nodejs_buildpack" as a build pack.&lt;/P&gt;
  &lt;P&gt;Can someone please help me to indentify the root cause of this issue and let me know how to fix it ?&lt;/P&gt;</description>
    <pubDate>Mon, 11 Feb 2019 09:46:46 GMT</pubDate>
    <dc:creator>former_member603224</dc:creator>
    <dc:date>2019-02-11T09:46:46Z</dc:date>
    <item>
      <title>Deployemnt of Angular6 &amp; NodeJS app  on Cloud Foundary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deployemnt-of-angular6-nodejs-app-on-cloud-foundary/m-p/763543#M37233</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I have an Angular 6 application which is communicating to Node services. I have deployed both app (Angular &amp;amp; Node app) to cloud foundary. On SCP, both app are residing in a common space, but source code are inside diffrent folders. In the cockpit, i can see two diffrent apps. After deploying both the app, i ran a command i.e. "cf apps" which is giving me 2 diffrent url for both applications.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Angular: &lt;A href="https://simple-crud-app.cfapps.eu10.hana.ondemand.com/" target="test_blank"&gt;https://simple-crud-app.cfapps.eu10.hana.ondemand.com/&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Node: &lt;A href="https://simplehttpserver-zany-giraffe.cfapps.eu10.hana.ondemand.com/" target="test_blank"&gt;https://simplehttpserver-zany-giraffe.cfapps.eu10.hana.ondemand.com/&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;When i am running angular url in browser, it is giving me CORS error because both application is running on diffrent urls.&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;Error: Access to XMLHttpRequest at 'https://simplehttpserver-zany-giraffe.cfapps.eu10.hana.ondemand.com/' from origin 'https://simple-crud-app.cfapps.eu10.hana.ondemand.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;For angular app, i am using "staticfile_buildpack" in the manifest.yml file and for node app i am using "nodejs_buildpack" as a build pack.&lt;/P&gt;
  &lt;P&gt;Can someone please help me to indentify the root cause of this issue and let me know how to fix it ?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 09:46:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deployemnt-of-angular6-nodejs-app-on-cloud-foundary/m-p/763543#M37233</guid>
      <dc:creator>former_member603224</dc:creator>
      <dc:date>2019-02-11T09:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Deployemnt of Angular6 &amp; NodeJS app  on Cloud Foundary</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/deployemnt-of-angular6-nodejs-app-on-cloud-foundary/m-p/763544#M37234</link>
      <description>&lt;P&gt;I have added the CORS header before sending the response to client and it's working for me. Here is the code snippet below.&lt;/P&gt;&lt;P&gt;response.header('Access-Control-Allow-Origin', '*');&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 05:19:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/deployemnt-of-angular6-nodejs-app-on-cloud-foundary/m-p/763544#M37234</guid>
      <dc:creator>former_member603224</dc:creator>
      <dc:date>2019-02-14T05:19:02Z</dc:date>
    </item>
  </channel>
</rss>

