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
  • Hi @asheemparto, Can you show me note for how to install PWA on magento 2.3 or links how do that? I tried with magento-research.github.io/pwa-studio/venia-pwa-concept/setup but not success.
    – xanka
    Mar 14, 2019 at 8:20
  • 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-44e0557f49cb4cedfac
    – sakshi
    Jun 18, 2019 at 12:08

2 Answers 2

1

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
4
  • Any host file entry is required after changing the exact domain? Apr 23, 2019 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" Apr 23, 2019 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. Apr 25, 2019 at 7:21
  • How to run PWA on server ip address?
    – Arjun
    Aug 11, 2020 at 10:50
1

@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 !!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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