Code Monkey home page Code Monkey logo

baastofirebase's Introduction

BaaS to Firestore migration

This is not an officially supported Google product. This tool was created to help you migrate data from BaaS to Firestore. It will download all collections from a BaaS organization and app and create the data entities in Firestore.

How to install

Download or clone this repository:

git clone https://github.com/kbouwmee/baastofirebase.git

Install npm packages:

npm install

Firestore Service Account

You need to export a private key for a service account from FireStore and place it in a file called service-key.json. Get serviceAccount JSON file from Project Setting > SERVICE ACCOUNTS in Firebase Console. See here for some screenshots.

Configuration

Create and edit a config.js file to make some settings. The following configuration items are required:

var config.baas = {};
// BaaS protocol http:// or https://
config.baas.prot = "https://";
// BaaS host name
config.baas.host = "apibaas-trial.apigee.net";
// BaaS org name to copy from
config.baas.org = 'demoorg';
// BaaS app name to copy from
config.baas.app = 'demoapp';
// BaaS org client_id
config.baas.client_id = '12334567890';
// BaaS org secret
config.baas.secret = '0987654321';
// filter attributes list:  these attributes will NOT be migrated
config.baas.filterAttributes = ['uuid', 'type', 'metadata'];

config.firestore = {};
// Firestore DB name
config.firestore.db = 'test-db-1234';

module.exports = config;

Running the tool

To execute the migration:

node index.js

baastofirebase's People

Contributors

shadowninja avatar

Watchers

Kevin Bouwmeester avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.