How to upload existing mongodb users into Meteor app? -


we have existing mongodb imported meteor app using:

mongorestore -h 127.0.0.1 --port 3001 -d meteor dump/mymongodb

now seems can access collection find using collection name example:

meteor.publish 'works', ->   works.find({}, {limit: 10, sort: {createdat: -1}}) 

seems work, had collection named works. didn't have define it:

@works = new meteor.collection('works')  

although wouldn't hurt define it.

but lost when comes meteor.users collection. had collection in our database called users, cannot access one. how can our users collection other mongodb meteor.users app?

ps. can access users collection directly terminal using 'meteor mongo' , search db.users.findone() cannot seem access code files.

you need collections defined in order use them. meteor.users defined accounts packages (e.g. accounts-password). if not using of packages, need define collection so:

@users = new mongo.collection 'users' 

or

@meteor.users = new mongo.collection 'users' 

i regularly in apps talk our database don't require user interaction (db migrations, stats reporting, etc.).

of course, without accounts packages installed, none of other user functionality, may not matter in case.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -