【发布时间】:2019-02-23 14:09:54
【问题描述】:
我需要在解析服务器设置中添加 FCM 推送。请帮帮我。
但是从解析发送时。那么解析服务器和 FCM 之间存在一些问题。
这是我的 index.js,示例代码:
var express = require("express");
var ParseServer = require("/usr/lib/node_modules/parse-server").ParseServer;
var ParseDashboard = require("/usr/lib/node_modules/parse-dashboard");
var allowInsecureHTTP = true;
var api = new ParseServer({
databaseURI: "mongodb://127.0.0.1:27017/****",
appId: "****",
masterKey: "****",
serverURL: "http://**.**.**.**:1234/parse",
push: {
ios: {
pfx: "/usr/lib/node_modules/push_crt.p12",
passphrase: "example",
bundleId: "com.example",
production: true
},
android: {
senderId: "123456",
apiKey: "******"
}
}
});
var dashboard = new ParseDashboard(
{
apps: [
{
serverURL: "http://**.**.**.**:1234/parse",
appId: "******",
masterKey: "******",
appName: "MyApp"
}
],
users: [{ user: "admin", pass: "admin" }]
},
allowInsecureHTTP
);
var app = express();
// make the Parse Server available at /parse
app.use("/parse", api);
// make the Parse Dashboard available at /dashboard
app.use("/dashboard", dashboard);
var httpServer = require("http").createServer(app);
httpServer.listen(1234);
请检查并帮助我。如何在解析服务器中添加 FCM 连接。
【问题讨论】:
-
你到底有什么问题?
-
@AlexanderGutenev 我想在解析服务器中添加 fcm 服务器密钥。
标签: parse-platform push-notification parse-server