I have successfully installed PWA-studio with Magento 2.3. But I am not able to run it on production mode on a Ubuntu 18.04 LTS server so that we can access the PWA remotely but I am always able to start the application in development mode which only accessible locally.
How I can configure my server as well as the PWA-studio so that we can access the application remotely?
- 
 Can you please explain brief how you managed with pm2Srinivas Madamshetty– Srinivas Madamshetty2019年01月29日 09:11:04 +00:00Commented Jan 29, 2019 at 9:11
 - 
 This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewRama Chandran M– Rama Chandran M2019年01月29日 09:33:07 +00:00Commented Jan 29, 2019 at 9:33
 - 
 This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From ReviewMohit Kumar Arora– Mohit Kumar Arora2019年01月29日 09:39:28 +00:00Commented Jan 29, 2019 at 9:39
 
1 Answer 1
- git clone https://github.com/magento-research/pwa-studio.git
 - cd pwa-studio
 - npm install
 - cp packages/venia-concept/.env.dist packages/venia-concept/.env
 - edit and change MAGENTO_BACKEND_URL in packages/venia-concept/.env
 - In pwa-studio folder run: npm run build && NODE_ENV=production PORT=8000 npm run stage:venia
 
It will start the server on port 8000.
I used PM2 to manage node services.
(cd packages/venia-concept/ && NODE_ENV=production PORT=8000 node server.js)
Then I made Nginx proxy to pass connection from 8000 to 80 and 443
Hope it helps.
- 
 Can you update your answer with the Nginx configuration so that it will be helpful?Asheem Patro– Asheem Patro2019年01月15日 04:56:23 +00:00Commented Jan 15, 2019 at 4:56
 - 
 When I used this command I getting below as output after the build has been completed. Using environment variables from .env Launching staging server... NODE_ENV=production and no PORT set. Binding to localhost with random port 0.0.0.0:35210 UPWARD Server listening in production mode. GET / 200 357.467 ms - 2186Asheem Patro– Asheem Patro2019年01月15日 09:59:16 +00:00Commented Jan 15, 2019 at 9:59
 - 
 1PWA studio docs state that
yarn run stage:venia: "Generates build artifacts and runs the staging environment, which uses more compressed assets and more closely reflects production." That doesn't sound like the way to run in production, just something that more closely reflects real production setup. Would be nice to know what's a proper way to set it up for production use.Qtax– Qtax2019年03月22日 11:28:37 +00:00Commented Mar 22, 2019 at 11:28