Pipedream of an easy setup admin as a microservice.
Basically, everything has to be stored in a collection and accessed by a second app. (Or does it..?)
- Install
meteor add admin-microservice
on your main Meteor app
This adds server side code: admin methods, admin publish functions, roles package
npm install meteor-admin
installs cli toolmeteor-amin init
generates skeleton admin app, based on github templateMONGO_URL=mongodb://localhost:3001 meteor -p 3100
Main app scans global variables and stores them in a collection: AdminCollections
.
Admin app generates config file from this collection
Admin app generates CRUD functionality
- Frontend agnostic
- Much easier to edit code and add templates than in a a package
-
Via mongo driver
_.keys(MongoInternals.defaultRemoteCollectionDriver().mongo._observeMultiplexers)
(sometimes misses some depending on state of app) -
Cycle through top level objects
Favorites = new Mongo.Collection('favorites');
->Favorites._name == 'favorites'
meteor add admin-collection-2
SimpleSchema
instances are converted to JSON and stored in collection
Can generate Schemas and add create autoforms based on these
No idea
Even if the above worked flawlessly (unlikely) it would still be the case that custom publish functions, custom fields didn't work properly.