我将Parse-Server-Example分叉,以使用Parse-Server创建我的新应用程序。
我是节点应用的新用户,但还没有很多文档。
是否可以在我的应用中使用Parse-Dashboard,以便用户可以登录并查看数据库?
如果是,我如何在index.js
?
这可能就这么容易吗?
var parseDashboard = require('parse-dashboard');
var dash = new parseDashboard( {
"serverURL": "http://localhost:1337/parse",
"appId": "myAppId",
"masterKey": "myMasterKey",
"appName": "MyApp"
});
如果是这种情况,我该如何导航到仪表板视图?
由于
答案 0 :(得分:0)
This answer为我工作:
var ParseServer = require('parse-server').ParseServer;
var ParseDashboard = require('parse-dashboard');
...
// Added near the end of the file after the createLiveQueryServer
// Try to setup the dashboard
var config = {
"apps": [
{
"serverURL": "yourparsedomain" + mountPath,
"appId": "YOUR_APP_ID",
"masterKey": "YOUR_MASTER_KEY",
"javascriptKey": "YOUR_JAVASCRIPT_KEY",
"restKey": "YOUR_REST_KEY",
"appName": "YOUR_APP_NAME",
"appNameForURL": "uniquename",
"production": true
}
],
"users": [
{
"user":"user1",
"pass":"pass1"
},
{
"user":"user2",
"pass":"pass2"
}
]
};
var allowInsecureHTTP = false;
var dash = ParseDashboard(config, allowInsecureHTTP);
app.use('/dash', dash);