From a535ce2d8ec540f9c2d263e3c52d6c95d8251a75 Mon Sep 17 00:00:00 2001 From: stone Date: Sat, 23 Sep 2017 16:01:25 -0400 Subject: specify port --- index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index 663faeeb..41557d36 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: { @@ -84,7 +86,7 @@ var app = okcms.createApp({ push: { lib: require("./lib/okpush"), - mongodbUrl: "mongodb://localhost/okpush_stone", + mongodbUrl: "mongodb://localhost/okpush_stone" + '_dev', production: false, apn_development: { cert: path.join(__dirname, "./lib/okpush/certs/aps_development_cert.pem"), @@ -116,6 +118,6 @@ var app = okcms.createApp({ }, } -}).listen(1337) +}).listen(port) -console.log('Server listening at port 1337...'); +console.log('Server listening at port ' + port + '...'); -- cgit v1.2.3-70-g09d2 From 63269b7ec7f94c3040cdcf4431cc98c54d39cbec Mon Sep 17 00:00:00 2001 From: stone Date: Tue, 26 Sep 2017 14:20:44 -0400 Subject: back in production baby --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index 663faeeb..e2b0a6f4 100644 --- a/index.js +++ b/index.js @@ -85,7 +85,7 @@ var app = okcms.createApp({ push: { lib: require("./lib/okpush"), 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"), @@ -94,10 +94,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", -- cgit v1.2.3-70-g09d2