What is Firebase Storage?

Just like the above image, Firebase provides us with a storage mechanism, where we can create different buckets (in short rooms) to store different variety of items. For example:- One bucket can be used to store cat images, another bucket can be to store dog images. In short, you can store any kind of files onto Firebase storage.

Why do we need to use Firebase Storage?

Because Firebase Cloud Storage is a powerful yet easy-to-use tool for storing all sorts of objects. We can store images, audio, video, and other types of user content.

After a small introduction about Firebase Storage, let’s jump onto the main idea behind our article today, we will be looking into how one can integrate node.js with Firebase storage and upload files onto the cloud.

What are the things we need to get started ?

  1. Gmail account.
  2. Basic knowledge of javascript.
  3. Familiarity with Node.js and how npm works.

Ok now without wasting any more time, let’s get onto the topic.

Install required Dependencies

Create a folder with any name and run the command npm init . That will create a package.json file and few other config related files. Now, to install dependencies, run the below command inside the folder that you just created.

  • npm i @google-cloud/storage
  • npm i express

#firebase #javascript #nodejs

How to upload files to Firebase Storage in Node.js
118.60 GEEK