summaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/index.js b/index.js
index a5262624..217d57d4 100644
--- a/index.js
+++ b/index.js
@@ -2,6 +2,8 @@ var okcms = require('okcms')
var assign = require('object-assign')
var path = require('path')
+var port = process.env.PORT || 1337
+
var app = okcms.createApp({
meta: {
@@ -85,8 +87,10 @@ var app = okcms.createApp({
push: {
lib: require("./lib/okpush"),
+ // mongodbUrl: "mongodb://localhost/okpush_stone" + '_dev',
+ // production: false,
mongodbUrl: "mongodb://localhost/okpush_stone",
- production: false,
+ 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"),
@@ -95,10 +99,10 @@ var app = okcms.createApp({
}
},
apn_production: {
- // cert: path.join(__dirname, "./lib/okpush/certs/aps_production_cert.pem"),
- // key: path.join(__dirname, "./lib/okpush/certs/aps_production_key.pem"),
+ 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",
+ gateway: "gateway.push.apple.com",
}
},
bundleId: "us.okfoc.stoneisland",
@@ -117,6 +121,7 @@ var app = okcms.createApp({
},
}
-}).listen(1337)
+}).listen(port)
+
+console.log('Server listening at port ' + port + '...');
-console.log('Server listening at port 1337...');