summaryrefslogtreecommitdiff
path: root/examples/lib/okpush/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/lib/okpush/index.js')
-rw-r--r--examples/lib/okpush/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/lib/okpush/index.js b/examples/lib/okpush/index.js
index 04cf33a..6ef83c6 100644
--- a/examples/lib/okpush/index.js
+++ b/examples/lib/okpush/index.js
@@ -1,4 +1,5 @@
/**
+ * OKPush - Handles basic broadcast push notifications, as well as keeping track of tokens.
*/
var path = require('path')
@@ -28,6 +29,8 @@ function OKPush (options) {
throw new Error('Notifications not provided to OKPush')
if (!options.config.bundleId)
throw new Error('bundleId not provided to OKPush')
+ if (!options.config.mongodbUrl)
+ throw new Error('mongodbUrl not provided to OKPush')
var express = options.express
var router = express.Router()
@@ -50,9 +53,8 @@ function OKPush (options) {
router.use('/admin/', passport.initialize())
router.use('/public/', express.static(path.join(__dirname, './public')));
- // monkeypatch because of this app.use(router) shit.. obnoxious
+ // monkeypatch because of app.use(router) .. obnoxious
router.all('/admin/(:path*)?', function (req, res, next) {
- // req.url = "/_services/push" + req.url
req.newUrl = req.url
req.url = req.originalUrl
next()