0

I'm brand-spanking-new to Meteor and I would like to integrate it with my existing system that is powered by a MongoDB. I see that meteor has an accounts-facebook and accounts-twitter package to help me with authenticating on these services which is what my existing system does.

The problem is that I already have a format for my users collection. I don't mind adding additional fields for the data I don't have but I rather have meteor use the fields I already have defined. Ie: username and email.

So,

a) How do I use meteor to connect to an existing db while in development?

b) How do I tell meteor which fields to use for username and email?

Glitches
  • 742
  • 2
  • 8
  • 18

2 Answers2

0

Please see:

http://projectricochet.com/blog/can-meteor-and-mysql-play-nicely-together#.VG_01IXLu1s

https://meteorhacks.com/does-meteor-scale.html

http://www.fastcolabs.com/3007015/how-use-mysql-meteor

http://joshowens.me/meteor-and-mongo-performance/

http://shiggyenterprises.wordpress.com/2013/03/13/accessing-an-mssql-database-from-meteor/

Can we use Meteor framework with mysql database

Community
  • 1
  • 1
happyvirus
  • 279
  • 3
  • 21
  • Thanks for the answers. Sorry about the SQL impression, my existing DB is MongoDB that already has users set up but in a different format. I'll try to ask more specifically. A) How do I configure meteor to connect to my existing mongo db? B) Can I extend Meteors user system to use specific fields in my Mongo's user collection? For example, I want to specify my username and email field to use. – Glitches Nov 23 '14 at 01:28
  • Not sure, but perhaps this may help? http://stackoverflow.com/questions/20535755/using-multiple-mongodb-databases-with-meteor-js – happyvirus Nov 23 '14 at 01:33
0

a) How do I use meteor to connect to an existing db while in development?

Currently there is no official support for SQL system, assuming that you're one. Meteor recently acquired FathomDB and we can't expect SQL support soon, Redis is coming sooner I believe.

b) How do I tell meteor which fields to use for username and email?

An easy solution is to insert create accounts for all users and when you create a user you use the same ID. Why? When you use subscriptions you make use of this.userId which is the Id of Meteor.users. On time I had different ids for the same user and fields pointing to the other Id but It wasn't a good approach.

With this solution, I'm assuming that you're going to use MongoDB, for any other databases: you'll have to be very patience. I would love to be using CouchBase today with Meteor but I don't think that this is going to have any time soon. SQL systems are going have better luck maybe next year.

Mário
  • 1,603
  • 14
  • 24