1.0.7 • Published 1 month ago

firebase_migrate_now v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Migrate From Firebase

No more vendor lockin for firebase, use our package to convert your firestore data into a csv file

Installation

Download from NPM

  npm install firebase_migrate_now

Usage

const { initializeApp } = require('firebase/app');
const { migrateFirestore } = require('firebase_migrate_now');
const { getFirestore, collection, getDocs } = require('firebase/firestore');

const firebaseConfig = {
... your firebase config
};
const app = initializeApp(firebaseConfig);
const db = getFirestore(app);
const userCollection = collection(db, 'user_data'); // Replace 'user_data' with your actual collection name
const outputPath = './data.csv';

async function fetchAndMigrateData() {
  try {
    const collections = await getDocs(userCollection);

    await migrateFirestore(collections.docs, outputPath);

    console.log('Firestore data migration completed successfully.');
  } catch (error) {
    console.error('Error:', error);
  }
}

fetchAndMigrateData();

migrateFirestore()

ParameterTypeDescription
collectionsfirestore Collectionfirestore collection
outputPathstringpath of csv file

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.


Logo

1.0.7

1 month ago

1.0.6

1 month ago

1.0.5

1 month ago

1.0.4

1 month ago

1.0.3

1 month ago

1.0.2

1 month ago

1.0.1

1 month ago

1.0.0

1 month ago