push notification - How to create a app in Bitnami parse-server -
i have hosted bitnami parse server in aws http service. unable create new app in parse server through dashboard. tried 1 hour demo bitnami parse-server in demo unable create new app. how this?
https://bitnami.com/stack/parse
i unable achieve through rest api also. because demo site doesn't required credentials login. /1/apps api call requires email/password create app.
how create app in demo site?
bitnami developer here,
unfortunately, can not create new app using demo site. note app serve api. that, need access via ssh , edit /opt/bitnami/apps/parse/htdocs/server.js file. instance, have 2 apps code below:
var express = require('express'); var parseserver = require('parse-server').parseserver; var app = express(); //api 1 var api1 = new parseserver({ databaseuri: "mongodb://root:password@127.0.0.1:27017/bitnami_parse1", cloud: "./node_modules/parse-server/lib/cloud-code/parse.cloud.js", appid: "myappid1", masterkey: "mymasterkey1", filekey: "myfilekey1", serverurl: 'http://x.x.x.x:80/parse1' }); app.use('/parse1', api1); //api 2 var api2 = new parseserver({ databaseuri: "mongodb://root:password@127.0.0.1:27017/bitnami_parse", cloud: "./node_modules/parse-server/lib/cloud-code/parse.cloud.js", appid: "myappid2", masterkey: "mymasterkey2", filekey: "myfilekey2", serverurl: 'http://x.x.x.x:80/parse2' }); app.use('/parse2', api2); var port = 1337; app.listen(port, function() { console.log('parse-server running on port ' + port); }); //parse dashboard var parsedashboard = require('parse-dashboard'); var dashboard = new parsedashboard({ apps: [ { appname: "myapp1", appid: 'myappid1', masterkey: 'mymasterkey1', filekey: 'myfilekey1', production: true, serverurl: 'http://x.x.x.x:80/parse1' } , { appname: "myapp2", appid: 'myappid2', masterkey: 'mymasterkey2', filekey: 'myfilekey2', production: true, serverurl: 'http://x.x.x.x:80/parse2' } ] , "users": [ { "user":"user", "pass":"password" } ] }); app.use('/', dashboard); var portdash = 4040; app.listen(portdash, function() { console.log('parse-dashboard running on port ' + portdash); });
then, need add lines below /opt/bitnami/apps/parse/conf/httpd-app.conf set apache proxypass configuration:
proxypass /parse1 http://127.0.0.1:1337/parse1 proxypassreverse /parse1 http://127.0.0.1:1337/parse1 proxypass /parse2 http://127.0.0.1:1337/parse2 proxypassreverse /parse2 http://127.0.0.1:1337/parse2
and restart services executing:
$ sudo /opt/bitnami/ctlscript.sh restart
i hope find useful.
Comments
Post a Comment