5

I have installed the PWA studio successfully with the Venia storefront. But my development environment URL is generating something like below.

https://magento-venia-concept-3328z.local.pwadev:8048/

How I can change the URL to something else.

2

You can change the PWA development environment domain names by updating below env variables inside below path.

/var/www/pwa-studio/packages/venia-concept/.env:37

And uncomment below lines and give your domain names.

#   By default your subdomain will be detected from your package.json name.
#   Use this to override it.
#   MAGENTO_BUILDPACK_SECURE_HOST_SUBDOMAIN='custom-value'
#   This will prepend the uniquely generated domain with `custom-value`.
#
#   By default your custom host will be a subdomain of `local.pwadev`.
#   Use this to specify an entire domain, avoiding that TLD.
#   MAGENTO_BUILDPACK_SECURE_HOST_EXACT_DOMAIN='my-favorite.pizza'

Then rebuild using below commands and watch the Venia storefront on the new domain name.

npm run build
npm run watch:venia
| improve this answer | |
  • Any host file entry is required after changing the exact domain? – Kalyan Chakravarthi V Apr 23 '19 at 7:48
  • I am getting this message while running the build "could not configure or access custom host. using loopback" and the frontend URL changes to something like "0.0.0.0:9076" – Kalyan Chakravarthi V Apr 23 '19 at 7:59
  • Are running it on local machine then this way you can change the URL. If you are trying to install it on the server then you have to start the node server and proxy that one on nginx to load on the desired URL. – Asheem Patro Apr 25 '19 at 7:21
  • How to run PWA on server ip address? – Arjun Aug 11 at 10:50
0

@sakshi

You need to do following things to resolve the url issues:

  1. check the environment file nano packages/venia-concept/.env
  2. change MAGENTO_BACKEND_URL=http://yourdomain/ in your case it should be MAGENTO_BACKEND_URL=https://health365.local/
  3. change CUSTOM_ORIGIN_EXACT_DOMAIN=health365.local
  4. your 10000 port should open (very important) , you need to add it in .env file DEV_SERVER_PORT=10000, save the .env file.
  5. run this command to generate ssl cert for venia package yarn buildpack create-custom-origin packages/venia-concept
  6. yarn run watch:venia

enjoy !!

| improve this answer | |
0

When I run this command:- yarn run build && npm run stage:venia I get the following error, but build is run successfully:- WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). This can impact web performance. Assets: js/client.js (411 KiB) js/vendor~client-44e0557f49cb4cedfacb.js (305 KiB) js/10-c42c77dd37dbff0743c3.js (327 KiB)

WARNING in entry point size limit: The following entry point(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. Entry points: client (716 KiB) js/vendor~client-44e0557f49cb4cedfacb.js js/client.js

Please let me know how to resolve this. my project is set with https://health365.local/ url and venia-concept/.env file has configuration below:- MAGENTO_BACKEND_URL=”https://health365.local/”

the output of the build stage is:-

ℹ 「wdm」: wait until bundle finished: ℹ 「wds」: Project is running at https://magento-venia-concept-ofxov.local.pwadev:10000/ ℹ 「wds」: webpack output is served from https://magento-venia-concept-ofxov.local.pwadev:10000/ ℹ 「wdm」: Version: webpack 4.29.6 Time: 4808ms Built at: 06/18/2019 3:45:16 PM ℹ 「wdm」: Compiled successfully.

│ PWADevServer ready at https://magento-venia-concept-ofxov.local.pwadev:10000/ │ │ GraphQL Playground ready at https://magento-venia-concept-ofxov.local.pwadev:10000/graphiql

how shall I access to PWA here and with which URL?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.