在parse中,当我要创建新应用时,我使用:
In parse, when I want to create new app, I use:
curl -X POST \ -H "X-Parse-Email: <PARSE_ACCOUNT_EMAIL>" \ -H "X-Parse-Password: <PARSE_ACCOUNT_PASSWORD>" \ -H "Content-Type: application/json" \ -d '{"appName":"my new app","clientClassCreationEnabled":false}' \ api.parse/1/apps但是当我将解析服务器部署到Heroku和Digital Ocean时,我不知道要创建新的应用程序,因为我的服务器没有PARSE_ACCOUNT_EMAIL和PARSE_ACCOUNT_PASSWORD.当我部署解析仪表板时,它没有像Parse这样的创建新应用".
But when I deployed Parse server to Heroku and Digital Ocean, I didn't know to create new app, because my server doesn't have PARSE_ACCOUNT_EMAIL and PARSE_ACCOUNT_PASSWORD. When I deployed parse dashboard, it didn't have "Create a new app" like Parse.
如何使用自托管的Parse服务器创建新应用?
How can I create new app with my self-hosted Parse server?
推荐答案自托管解析服务器每台服务器只能处理一个应用程序,至少目前是这样. 这意味着您将必须使用多个Parse安装,每个安装使用多个应用程序使用一个应用程序,或者在同一台服务器上使用多个解析实例,但是将每个服务器配置为使用不同的端口.
The self hosted parse servers can only handle one app per server, at least for now. This means that you will have to use several installations of Parse, one app per installation using multiple servers or multiple instances of parse on the same server but configure each server to use different ports.
要回答您的问题:不,您不需要使用parse来创建新的应用程序. 要创建新应用,请在数字海洋或其他托管服务器上的解析配置/启动文件中设置appID和密码. appID和密码可以是您自己输入的任何内容,不需要来自parse.
To answer you question: No you do not need to use parse to create new apps. To create a new app you set the appID and password in the parse config/start file on your digital ocean or other hosted server. The appID and password can be anything that you make up, it does not need to be from parse.
以下是启动文件中的环境设置示例:
Below is an example of the environment settings in a startup file:
**Example file: ~/parse-server-example/my_app.js** var express = require('express'); var ParseServer = require('parse-server').ParseServer; // Configure the Parse API var api = new ParseServer({ databaseURI: 'mongodb://localhost:27017/dev', cloud: __dirname + '/cloud/main.js', appId: 'myOtherAppId', masterKey: 'myMasterKey' }); var app = express(); // Serve the Parse API on the /parse URL prefix app.use('/myparseapp', api); // Listen for connections on port 1337 var port = 9999; app.listen(port, function() { console.log('parse-server-example running on port ' + port + '.'); });然后使用以下命令运行文件:
Then run the file with:
node my_app.js您可以在此处了解更多信息:在Digital Ocean解析服务器
You can read more here: Parse Server at Digital Ocean
更多推荐
如何使用解析服务器创建应用程序?
发布评论