So I have a nodejs app that is using sailsjs web framework. While Im developing, I have the adapter set to sails-disk. Sample data from disk.db is like
{
"data": {
"authentication": [
{
"user_id": 1,
"username": "user1",
"encrypted_password": "password here",
"createdAt": "2014-05-12T07:40:24.901Z",
"updatedAt": "2014-08-18T19:37:22.851Z",
"id": 1,
"email": "[email protected]"
}
],
"user": [
{
"name": "user0001",
"email": "[email protected]",
"role": [
"admin"
],
"phone": [
{}
],
"status": "Active",
"createdAt": "2014-05-12T07:48:11.028Z",
"updatedAt": "2014-05-24T08:12:41.646Z",
"id": 1,
"username": "user1"
}
]
}
}
This works perfectly on my local machine. Now, I'm ready to deploy it on production and use mongodb as my database. I have all the connections setup and I can successfully connect on my db.
My question is: Is there a way that I can import my local disk database (disk.db) to mongodb while maintaing my json data format or collections? Or I need to create my collections on mongodb manually and import each collection?