magento / pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.06k stars 682 forks source link

[doc]: A deployment of dist folder using upward-js and node+express - graphql is failing #3771

Closed naag-pal closed 2 years ago

naag-pal commented 2 years ago

PWA Studio has a MAGENTO_BACKEND_URL is : http://XXXXXXX.compute-1.amazonaws.com/

yarn build and copied /dist to a folder where upward-js and node+express is exist.

using @magento/upward-js and express on the node server

const { createUpwardServer } = require('@magento/upward-js');

async function serve() { await createUpwardServer({ port: '8082', bindLocal: true, logUrl: true, upwardPath: './dist/upward.yml' }); }

serve();

When I run the server node server.js

http://XXXXXXX.compute-1.amazonaws.com:8082/ is the url loading fine.

But the magento calls are failing with 500 internal server.

so the data from local it is not loadig fine.

When I run "yarn watch" on pwa-studio folder with same MAGENTO_BACKED_URL - graphql loading fine.

Need help on getting details of what's wrong here or any document referral which has clear instruction so that /dist folder can be hosted.

m2-assistant[bot] commented 2 years ago

Hi @naag-pal. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


anthoula commented 2 years ago

@magento export issue to JIRA project PWA as Bug

github-jira-sync-bot commented 2 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-2776 is successfully created for this GitHub issue.

anthoula commented 2 years ago

Thanks for your feedback! For additional support on your question, please see our PWA community Slack channel.