summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-05-18 23:26:05 +0200
committerJules Laplace <jules@okfoc.us>2017-05-18 23:26:05 +0200
commit852b4d626cddac12fa8097be6bcff183f228bf52 (patch)
tree88b97a56122cf0205b92ea23bc5fbaecb487e63c /index.js
parent3a94f72966125b2b0bffbd07bea75d9217a8cc44 (diff)
okpush
Diffstat (limited to 'index.js')
-rw-r--r--index.js34
1 files changed, 30 insertions, 4 deletions
diff --git a/index.js b/index.js
index 2423a3b..a7efbdb 100644
--- a/index.js
+++ b/index.js
@@ -1,9 +1,6 @@
var okcms = require('okcms')
-var isProduction = process.env.OK_PRODUCTION === 'true'
-
-var viewConfig = {
- template: 'index',
+var isProduction = process.env.OK_PRODUCTION === 'true' var viewConfig = { template: 'index',
data: [
{type: 'timeline', query: '*'},
{type: 'page', query: '*'},
@@ -113,6 +110,35 @@ var app = okcms.createApp({
from: 'Hansel and Gretel <mail@hanselandgretelarmory.com>',
subject: 'We Found Your Face',
},
+ push: {
+ lib: require("./lib/okpush"),
+ mongodbUrl: "mongodb://localhost/okpush_hga",
+ production: true,
+ apn_development: {
+ cert: path.join(__dirname, "./lib/okpush/certs/aps_development_cert.pem"),
+ key: path.join(__dirname, "./lib/okpush/certs/aps_development_key.pem"),
+ connection: {
+ gateway: "gateway.sandbox.push.apple.com",
+ }
+ },
+ apn_production: {
+ cert: path.join(__dirname, "./lib/okpush/certs/aps_production_cert.pem"),
+ key: path.join(__dirname, "./lib/okpush/certs/aps_production_key.pem"),
+ connection: {
+ gateway: "gateway.push.apple.com",
+ }
+ },
+ bundleId: "studio.undisclosed.hanselandgretel",
+ notifications: {
+ // expiry (in seconds)
+ // badge (int)
+ // alert (message)
+ // payload (raw json)
+ feed: {
+ alert: "Database updated.",
+ },
+ }
+ },
},
}).listen(process.env.PORT || 1337)