mkdir -p ~/mongo ~/mongo/db cd ./mongo/ docker run -p 27017:27017 -v ~/mongo/db:/data/db -d mongo
git clone https://github.com/ParsePlatform/parse-server-example.git
npm install
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://localhost:27017/dev',
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: '你的appid',
masterKey: '你的masterkey', //Add your master key here. Keep it secret!
serverURL: 'http://公网ip或域名:1337/parse', // Don't forget to change to https if needed
liveQuery: {
classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions
}
});
nohup node index.js &
curl -X POST -H "X-Parse-Application-Id:你的id" -H "Content-Type: application/json" -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' 你的服务器地址:1337/parse/classes/GameScore
一些命令
jobs查看后台任务 fp job号调回前台 ps -aux|grep node
npm install -g parse-dashboard
{
"apps": [
{
"serverURL": "http://ip公网的/parse",
"appId": "你的id",
"masterKey": "你的masterkey",
"appName": "这个随便起"
}
],
"users": [
{
"user":"admin这是登陆用户名",
"pass":"admin这是密码"
}
]
}
node parse-dashboard --config dashboard-config.jsons --allowInsecureHTTP
访问http://域名或ip:4040
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。