sailstech / multiple-apps-parse-server Goto Github PK
View Code? Open in Web Editor NEWrun and manage multiple parse apps (instances) in a server and using a single port
License: MIT License
run and manage multiple parse apps (instances) in a server and using a single port
License: MIT License
Would be good to have a .sh to delete a single app from the setup.
Hello guys, i have seen many tutorials how to setup LiveQuey (most of them were prepared for back4app servers) However i found some tutorials made for self hosted servers and there was something like "index.js" which i believe is in this app "app.js". I've put like this code inside of var api = new ParseServer({...
liveQuery: { classNames: ["Test"] //List of classes to support for query subscritions },
and after that i put this:
var app = express();
app.use('/', api);
let httpServer = require('http').createServer(app);
httpServer.listen(1337);
var parseLiveQueryServer = ParseServer.createLiveQueryServer(httpServer);
Still doesn't work and i'm not even sure how this url liveQueryUrl: keyLiveQueryUrl looks like.
According to flutter doc's https://pub.dev/packages/parse_server_sdk_flutter i need this to use Live Query.
For example in this parser there's index.js whit pre setup live query https://github.com/parse-community/parse-server-example/blob/master/index.js i've tried to copy some code to my app.js but couldn't handle it.
I follow your instructions installing all needed but after created my first app, in the dashboard I see my app but I got:
"Server not reachable: unable to connect to server"
What's wrong?
when i try to create the first app using this script,error occurs as shown below:
app=myapp customer=trojx node newInstance.js
/root/parse-server/multiple-apps-parse-server/newInstance.js:42
return new Promise(async function(res,rej) {
^^^^^
SyntaxError: missing ) after argument list
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:389:7)
at startup (bootstrap_node.js:149:9)
need help plz :)
It looks like the database storage is sorted for app by collection prefix which defaults to the appID, is this true?
Is it possible to allow an option upfront in the config to setup a new db for each app created? Like in config.json an option we can set to true that will create a new mongodb://localhost:27107/<appId>
. This will allow easier portability backup and recovery on a per app basis...ya think?
If you want to take it a step further for security concerns you can generate a mongo username/password for new app also: mongodb://username:password@localhost:27107/<appId>
and create the user in mongo. If you offer this feature then you will need to create the mongo admin username:password along with the dashboard admin on first app creation.
This is awesome - very inventive and tight code. Thank you for sharing it.
I'm more of an implementer, not a coder or I would pull and give this shot - is it possible for you to extend this another step by allowing multiple apps per client key so if we want to use this as a developer dashboard type (like the hosted Parse app) we have a good kickstart?
Here is how I'd see it work FWIW:
An option on newInstance.js to enter clientKey like customer=firstapp node newInstance.js --clientKey HPStTfFbgFnSXwfCYZsA
or customer=firstapp clientKey=HPStTfFbgFnSXwfCYZsA node newInstance.js
..?
I suppose if you went this route you would have to use a client key in every app unless you make it an option like multipleAppsPerClient: true
or similar in the `config.json which will insert a unique client key each newInstance.js unless the client key is provided on init in an option similar to above.
For the dashboard:
Admin User = sees all apps
Client User = sees all apps that share the same client key (or just a single app if no client key specified)
Anyway, thought. If possible would be a great contrib to an already great contribution
I have added simple cloud function, but getting ERR_EMPTY_RESPONSE
Parse.Cloud.define('Hello', async (req,res) => {
return {"result":"OK"};
})
dashboard.bundle.js:42 POST http://localhost:3000/secondapp/functions/Hello net::ERR_EMPTY_RESPONSE
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.