I would like to give some major appreciation here to Swydo DDP-Apollo from @jamiter at Swydo. It took care of two things I had spent many hours trying to solve.
HTTPS on Localhost
I needed to get HTTPS on my local dev system. I got it working for most purposes, but the client wouldn’t connect to the Apollo subscription endpoint. I tried all kinds of different client and server setup code I found in the Apollo docs and on SO, but on my system, none of it was working with HTTPS.
Finally I decided to try out DDP-Apollo. BOOM. It worked immediately. @jamiter provides the client and server setup code and not only did it all work the first time – it cut the number of lines of setup code on client and server in half.
APOLLO on Galaxy
This week I’ve been trying to get my app working on Galaxy. Installation for the Meteor app was a breeze – very easy! But MDG Galaxy doesn’t really speak Apollo yet. I was trying to get Apollo working on Galaxy and I was told by Galaxy support:
Incoming traffic: You can only accept incoming traffic over the standard HTTP/HTTPS ports (80/443), not arbitrary ports. If you want an additional websocket server on top of the one built into Meteor, you should separate it by using a different URL path, not a different port.
This was giving me a lot of questions:
- Do I need an entirely separate domain? Would my app be running separately on each URL path???
Well, the thing about DDP-Apollo is, it runs all your Apollo calls over the same port Meteor uses for DDP. So I wondered, with DDP-Apollo… would it solve all those things?
Well, I pushed my app to Galaxy, and again, BOOM, it just worked – including Apollo subscriptions!
Major props to @jamiter and DDP-Apollo!