backend-assistant
v1.0.11
Published
Powerful assistive functions for Firebase backends
Downloads
33
Maintainers
Readme
Install
Install with npm:
npm install backend-assistant
Features
- Automatically parse incoming requests to get relevant information like IP, country, etc
- Automatically console log relevant information like the function name and more.
Example Setup
After installing via npm, simply paste this script in your functions/index.js
file.
// In your functions/index.js file
const admin = require('firebase-admin');
const functions = require('firebase-functions');
const Assistant = require('backend-assistant');
let assistant = new Assistant().init({
admin: admin,
functions: functions,
// req: req, // optional
// res: res, // optional
},
{
accept: 'json',
})
Usage
Now you can harness powerful features
// assistant.log: correctly logs objects in Firebase functions
assistant.log({
parent: {
child: 'value'
}
}, {environment: 'production'})
Final Words
If you are still having difficulty, we would love for you to post a question to the Backend Assistant issues page. It is much easier to answer questions that include your code and relevant files! So if you can provide them, we'd be extremely grateful (and more likely to help you find the answer!)
Projects Using this Library
Somiibo: A Social Media Bot with an open-source module library. JekyllUp: A website devoted to sharing the best Jekyll themes. Slapform: A backend processor for your HTML forms on static sites. SoundGrail Music App: A resource for producers, musicians, and DJs. Hammock Report: An API for exploring and listing backyard products.
Ask us to have your project listed! :)