Configure APNS on Parse Server - parse-platform

I'm trying to migrate from Parse.com service to a self-hosted Parse Server, and it's been a bit difficult.
Basically I set up my server like this:
Run $ npm install -g parse-server
Set env vars (PARSE_SERVER_DATABASE_URI, PARSE_SERVER_MASTER_KEY, PARSE_SERVER_APPLICATION_ID)
Run $ parse-server
Everything is up and running, and I also setup a machine running parse-dashboard in a very similar way.
I had already synced the database and had no problems with it.
The problem is that when I try to send a push notification, I get the message:
Missing push configuration
I believe that's connected to the APNS settings. In Parse.com dashboard we can add the APNS certificates, but on the self hosted dashboard there is no such option (or I couldn't find it).
What am I missing? How do I set theses things up?

I believe that running parse-server without the recommended Express wrapper does not give me full control of everything I needed to configure the application.
I created an Express app, started the serving using the guide #thailey01 suggested and now it works.

Related

Checklist when moving from Heroku to AWS

I am trying to move my backend API app (node.js express server) from Heroku to AWS Elastic Beanstalk. But I did not realize the amount of features that Heroku was providing automatically and which I now have to set up manually in AWS.
So here is the list of features which I discovered were missing in AWS and the solutions I have implemented.
Could you please let me know if I am missing something in order to run smoothly my APIs in AWS and get the equivalent of what I had in Heroku?
auto-restart server when crashed : I am using PM2 to automatically restart my server in case of critical error
SSL certificate : I am using AWS ACM certificate,
logging : have inserted the datadog agent in order to receive logs in datadog
logging response time : I have added the "morgan-body" package to get each requests' duration and response code (had to manually filter the AWS healthchecks and search engine bots, because AWS gave me an IP adress which was visited constatntly by Baidu bots)
server timeout : I have implemented a 1200000ms timeout on the whole app (any better option ?)
auto deploy from Github : I have implemented a github automation to deploy code automatically (better options?)
Am I missing something? This app is already live so I do not want to put my customers at risk when I will move from Heroku to AWS...
Thanks for your help!
I believe you are covered:
Heroku Dynos restart after crashing or raising an error (Heroku Restarting Policy)
SSL certificates are provided for free
logging: Heroku supports various plugins, including Datadog
response time (in millisec) is logged automatically
HTTP timeout is 30 sec (it cannot be changed)
deploy from Github is possible (connecting the accounts), Docker deployment is also supported. Better options? Using Github Actions to deploy a new version after code push or tagging.
If you are migrating a production environment I strongly suggest first to setup a Heroku (Free) Dyno to test and verify all your needs are satisfied.

Deploying a secret certificate file to Heroku from CI (Codeship)

An app I am building integrates with a 3rd party api. For access to this api it authenticates via oauth using the RSA-SHA1 signature method which requires a certificate file.
The app is continuously deployed on heroku (php) using codeship.
I don't want to check the certificate into source control for a variety of reasons but need a way to copy the certificate to the production dyno every time the app is deployed. This is because Heroku dynos are stateless so revert themselves when the app is deployed (as I understand it).
What is the best way to copy this certificate to my dyno? I thought of using a command like this but it fails to work:
heroku run "echo \"${CERTDATA}\" > ./storage/certs/my_cert.pem"
I could store the actual certificate data in an environment variable on Codeship so it would be always available.
Alternatively I could create the cert file in Codeship and then force add it to the git deployment to Heroku. Can anyone give any guidance here?
Why not just store the actual certificate data in an env var on Heroku?

Using Push notifications behind corporate proxy. Is this possible?

I am running a Rocket Chat 3.7.1 docker compose instance behind a corporate proxy server and we are having trouble getting push notifications working.
Has anyone been able to get this working before?
If so could you share the details of how you got it working please?
We ended up publishing our own custom builds of mobile apps that were signed appropriately for their platform.
Then, our settings disabled debugging, disabled the gateway, set production, and all the certificate/key values were set to what were generated for APN and GCM.

Firebase 3 database debug output when connecting from node.js SDKerv

Recently upgrading to run the firebase 3 sdk both in the client, in e2e tests and on the server.
Previously when using the firebase 2.x sdk you could connect to firebase in the same was as a client using signInWithCustomToken. This meant I could generate a token with the {debug: true} flag and use this for my mocha tests. Meaning I would get verbose output from firebase in the invent of security rejection.
Firebase 3 does not allow you to use client types of auth when running the sdk from node (i.e mocha). You must use service accounts. I have created the service account and have serviceaccount.json. I can connect and spoof the UID by using databaseAuthVariableOverride and everything is running AOK but I cannot figure out how to get firebase to send verbose database output so I can debug new firebase rules from my tests.
I have tried things like adding "Log Viewer" permission to my service account. I have also tried (in vein) to add debug: true to the serviceaccount.json
Any help appreciated.
Have you tried the following (in Node.js):
firebase.database.enableLogging(true);

Connect to a Heroku app after directory (and all other data) deleted on local machine

I lost all the data on my localmachine (Macbook Pro) and, to make matters worse, the repo for a Rails app hosted on Heroku has also been deleted on github. Since I lost all the data on my localmachine, whatever security keys I had installed have also been deleted so if I try to connect to Heroku it won't even recognize me. What can I do in this situation to download the app and export the database?
Are you still able to log into heroku.com? If so, you should be able to set up the heroku CLI again with a new public key. Then you should be able to use heroku git:clone APP to get the code from heroku.
With your database, there should be options for managing it on heroku.com or via the heroku CLI (e.g. heroku pg:pull if you're using postgres).

Resources