0

I have created a simple create-react-app. My aim is to have a separate route(endpoint) say 'localhost/pwa' to act as a PWA page(app). Most of the articles I found online talks about converting an entire React app into a PWA(which is not my use case).

I tried manipulating the index.html by adding a service worker file to it. But, not able to isolate an endpoint as a PWA as the entire app is getting rendered inside the index.html.

Thanks

6
  • What would be your usecase?
    – namgold
    Jan 31 at 10:54
  • I can share this url (or endpoint) to the users, and once they access it through say phone, it can act as a PWA.
    – zero_db
    Jan 31 at 10:55
  • So, you means that on mobile, when they open localhost/pwa, it open the installed pwa. And when they open localhost/others, it wont open the installed pwa but open the browser instead?
    – namgold
    Jan 31 at 10:59
  • Yes for others, it must work like a normal web app. For mobile users, users must be able to install it like a pwa. Even in desktop, when we access that particular url, option to install it must be there
    – zero_db
    Jan 31 at 11:03
  • Does the /pwa interacts with other link? Like share components, data, href link to other? What if /pwa redirect to others? will it suddently open browser? What preventing you to create separated codebase with /pwa standalone
    – namgold
    Jan 31 at 11:09

0

Your Answer

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