Skip to content

Simple import script to import a JSON file containing an array into Firebase. Push each object in the array into Firebase generating a new push key for each new object..

License

Notifications You must be signed in to change notification settings

lifeonlars/firebase-array-importer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Firebase Import Script

This basic import scripts allows you to import a local JSON file containing an array into Firebase.

The script will parse through each object inte array and push them into Firebase to Push each object in the array into Firebase generating a new push key for each new object.

Demo

What do I need to get this working?

You can use this script on your local machine to migrate JSON data from other sources into Firebase. To do so you'll simply need to view the page via a local http server.

  • Clone the repository to a folder on your computer
  • Edit scripts/main.js and add your Firebase config in the code of this file (this information can be found in your console)
  • Install a local http server e.g. npm install -g http-server (Note this will require NodeJS and NPM to be installed on your local machine)
  • Using the command prompt navigate to the folder where you cloned the repository and then start the http server http-server
  • Then in your browser navigate to http://127.0.0.1:8080/

Alternatively you can add your Firebase config settings and then upload to a server somewhere and run the script from there

About

Simple import script to import a JSON file containing an array into Firebase. Push each object in the array into Firebase generating a new push key for each new object..

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published