npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

firebasenode

v1.5.0

Published

Setup :- * Use this cmd on root of the project. npm install * To setup firebase edit config/firebase.js with firebase-admin and firebase configurations (Both of them are required). * For server configuration edit config/server.json. * For develop

Readme

FirebaseNode

Version 1.5.0

FirebaseNode is framework that provides very easy Api management and connection with Firebase. With the use of FirebaseNode we can connect with firebase and create apis with them very quickly.

Installation

  • Use npm to install FirebaseNode
    npm i firebasenode

OR if you clone this repo

  • Use this cmd on root of the project.
    npm install 
  • To setup firebase edit config/firebase.js with firebase-admin and firebase configurations (Both of them are required).
  • For server configuration edit config/server.json.
  • For development run following cmd.
    npm run dev
  • For production run following cmd.
    npm start

Usage

  • Setup firebase console
    • Sign in to firebase account from here.
    • Create new project or use existing.
    • Now in your project deshboard click on web app and register your web app with providing nickname to your app.
    • Now this will show you some SDK code, from that copy firebasConfig and use that as firebase client config.
    • For the admin settings, Go to dashboard click on settings icon near Project Overview link in left sidebar.
      • click on Project Settings
      • Go to Service Accounts
      • Copy node-js config from that and in order to download service account json file click on Generate new private key and use that as service account json file.
  • SetUP Firebase Account in framework config:-
    • Modify config/firebase.js add your firebase client configuration to the key 'firebaseConfig'. add your firebase admin configuration to the key 'adminConfig' to add your service account json file at your desired location and require it in this file and replace serviceAccount const with your serviceAccount file data.
  • Create Apis :-
    • Create a folder inside apis folder with the name of api you want.
    • inside that folder create controllers and services folders and routes.json file
    • Format of the routes.json file will be as follows:
      [{
          "path": "path/to/api",
          "method": "REQUEST_METHOD",
          "action": "CONTROLLER_NAME.ACTION_NAME",
          "secure": true | false,
          "enabled": true | false
      }]
    • Here we can specify any number of routes we want.
    • If specified action or controllers is not there then that route will be ignored with console warning.
    • Note :- Here path will be prefixed with API_NAME/ACTUAL_PATH
  • Services :-
    • Services are defined in apis/{API_NAME}/services direcotry.
    • These services will be accessible with framework.services.{API_NAME}.{SERVICE_FILE_NAME}.{FUNCTION_NAME}
  • Controllers :-
    • Controllers are defined in apis{API_NAME}/controllers directory.
    • Access services with framework super global variable.

Changelog

  • Create global app/framework variable to access all controllers/services/firebase/middlewares etc
  • Apis added (All apis which are currently on can be found in apis folder in separated api named folder.)
  • Routes added (Now we'll need to just create routes.json containing routes info to define routes)
  • Controllers added (All actions that a route performs can be referenced and found in controllers folder of each api folder)
  • Firebase config separated from code. (Firebase and firebase admin can be configured from config/firebase.js)
  • Server configuration (server configurations like port number etc can be modified from config/server.json)
  • Firebase admin token middleware is separated from code and can be found at middlewares/firebase_token.js
  • Port checking added (Port will be veryfied before starting server on that port and will ask to start server from another free port without changing the code.)

TODO

  • Add cli support to create APIs.
  • implement env-cmd package
  • implement themes concept
  • Make One of the Firebase-admin or Firebase optional.
  • implement array of middlewares
  • implement global middlewares https://expressjs.com/en/guide/routing.html find express.Router
  • Add functions and config to global.