vincentmorneau / apex-pwa

A complete guide for turning an APEX application into a Progressive Web App
MIT License
82 stars 26 forks source link

Static files on proxy server #3

Open hairpin666 opened 5 years ago

hairpin666 commented 5 years ago

Hi Vincent,

Is it possible to put the manifest.json and sw.js on a seperate proxy server which forwards all requests to the ORDS?

Problem is, that I can't put any files in the root directory due to company restrictions but I would love to implement some PWA features.

Thanks

vincentmorneau commented 5 years ago

I want to explore more ways to store manifest.json and sw.js, and putting them on a seperate proxy server might be a good solution. I'm also exploring using ORDS to serve the two files, with a dummy html page that only redirects to the APEX app.

I would be happy to hear your feedback if you try before me.

I also think if you are serious about implementing PWA features, you can convince your DBA about opening the doc_root to you.

hairpin666 commented 5 years ago

I'll try the proxy server approach.

The problem is, that our instance is used by multiple applications therefore they don't want any custom changes for a single app, which is understandable but stops new features to be implemented :(.

lcapriles commented 5 years ago

Hi! along the same line, there is a sample PWA app hosted in apex.oracle.com (https://apex.oracle.com/pls/apex/f?p=144628:1:110374005330206:::::)... I am doing a sample PWA app using your awesome guide, also hosted in apex.oracle.com, but don't know how to put the manifest and sw files a the root dir. Any idea how get to the root dir in apex.oracle.com?(!!!)

Regards

vincentmorneau commented 5 years ago

apex.oracle.com is a sandbox environment in which you have no db access. You will not be able to put the service worker and the manifest there. Any other environment you can use for yourself?

lcapriles commented 5 years ago

Hi! Thank you for your prompt reply. Ja! I am doing it on the APEX cloud on purpose so as to evercome as many problems as possible (for example, my APEX app is doing web services with a JDEdwards demo running in an VirtualBox VM running in my laptop). Foreseeing this problems, I just configured an reverse proxy that is serving the APEX cloud and local files. As far a I can see, both the APEX cloud app and the local file appears to come from the reverse proxy when I point the browser to the reverse proxy. In the days to come, I will place the manifest an sw files and verify what happens.

vincentmorneau commented 5 years ago

I haven't done it myself on the Oracle Cloud but I have talked about it with a DBA & Cloud Specialist and there should not be any problem!

If you find a way to put the files there, I would love to see a tutorial ;)

Thanks!

MohamadBouchi commented 5 years ago

Hi, Thx for your guid, I'm new in Apex and I'm trying to make an existing App as a PWA App but I dont know where to put the manifest and sw files, I'm using tomcat8. Can you please guide me ?

Thanks.

vincentmorneau commented 5 years ago

Are you using ORDS Standalone or Glassfish? If you are using something else, I'll have to check with a DBA and get back to you

MohamadBouchi commented 5 years ago

I'm using Tomcat.

vincentmorneau commented 5 years ago

@MohamedSubhi I don't know the answer. I'll get back to you when our DBA returns from vacation...

MohamadBouchi commented 5 years ago

Okay, Thx.

hairpin666 commented 5 years ago

@lcapriles: did you succeed putting the files on the reverse proxy?

lcapriles commented 5 years ago

Hi! with the reverse proxy forwarding to apex.oracle.com I was only able to get half of the job: I was able to serve my app and the manifest/sw files, but when hitting submit I always got an "session expired" error: some how it seems that the cookies were not getting through.... I tried reverse proxying with both httpd and nginx with always more or less the same results... So I switched to my shiny new XE 18c with apex/ords 18 and today I begin the PWA thing!

hairpin666 commented 5 years ago

Anyone else successful with that approach?