From cdcd1867a22f2ba123ed56426679e528de80b7a4 Mon Sep 17 00:00:00 2001 From: Manuel <5673677+mtrezza@users.noreply.github.com> Date: Mon, 2 Oct 2023 02:10:48 +0200 Subject: [PATCH] docs: Minor refactor in README (#223) --- README.md | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 7b7158d..337e4e1 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,6 @@ The official Push Notification adapter for Parse Server. See [Parse Server Push - [Install Push Adapter](#install-push-adapter) - [Configure Parse Server](#configure-parse-server) - - # Silent Notifications If you have migrated from parse.com and you are seeing situations where silent (newsstand-like presentless) notifications are failing to deliver please ensure that your payload is setting the content-available attribute to Int(1) and not "1" This value will be explicitly checked. @@ -44,30 +42,26 @@ This will produce a more verbose output for all the push sending attempts ## Install Push Adapter ``` -npm install --save @parse/push-adapter@VERSION +npm install --save @parse/push-adapter@ ``` -Replace VERSION with the version you want to install. +Replace `` with the version you want to install. ## Configure Parse Server ```js const PushAdapter = require('@parse/push-adapter').default; -const pushOptions = { - ios: { /* iOS push options */ } , - android: { /* android push options */ } -} -// starting 3.0.0 -const options = { - appId: "****", - masterKey: "****", +const parseServerOptions = { push: { - adapter: new PushAdapter(pushOptions), + adapter: new PushAdapter({ + ios: { + /* Apple push notification options */ + }, + android: { + /* Android push options */ + } + }) }, - /* ... */ + /* Other Parse Server options */ } - -const server = new ParseServer(options); - -/* continue with the initialization of parse-server */ ```