我正在遵循从这里使用heroku中的解析服务器的标准教程。
https://github.com/ParsePlatform/parse-server/wiki/Push
我使用了开发.p12文件。我在解析服务器中的代码是这样的。
push: {
ios: {
pfx: 'mycert.p12', // The filename of private key and certificate in PFX or PKCS12 format from disk
bundleId: 'com.khantthulinn.example', // The bundle identifier associate with your app
production: false // Specifies which environment to connect to: Production (if true) or Sandbox
}
}
我使用此curl发送推送通知。应用ID和主密钥更改为假的。
curl -X POST \
-H "X-Parse-Application-Id: QCsRSsKJTHs2YGi2BdBsLTLcf4U1JpQoRtTU9d0l
" \
-H "X-Parse-Master-Key: XoEVsXstyWl3M8sJK1qO0ll1G5bWJpTUmhX90du1
" \
-H "Content-Type: application/json" \
-d '{
"where": {
"deviceType": { "$in": [ "ios", "android" ] }
},
"data": {
"title": "Ant-man",
"alert": "This is awesome. It is awesome."
}
}' \
https://myexample.herokuapp.com/parse/push
在错误日志中,我收到了这样的内容。
2016-05-21T03:01:51.081259 + 00:00 app [web.1]:> parse-server-example@1.4.0 start / app 2016-05-21T03:01:51.081265 + 00:00 app [web.1]:> node index.js 2016-05-21T03:01:51.081265 + 00:00 app [web.1]:2016-05-21T03:01:52.581823 + 00:00 app [web.1]: 在端口14168上运行的parse-server-example。 2016-05-21T03:01:52.698394 + 00:00 heroku [web.1]:状态由:改变 开始向上2016-05-21T03:03:15.488214 + 00:00 heroku [路由器]: at =错误代码= H13 desc ="连接关闭但没有响应" method = POST path =" / parse / push"主机= myexample.herokuapp.com request_id = 0b5s4fbd-7258-4635-99a-178e37be15ce fwd =" 123.4.20.97" dyno = web.1 connect = 1ms service = 11ms status = 503 bytes = 0
我需要在heroku中设置什么?