@primeanalytiq/emberflow
TypeScript icon, indicating that this package has built-in type declarations

1.3.53 • Public • Published

Emberflow

Emberflow is a library for Firebase Functions that simplifies the process of setting up security, validation, and business logic.

Usage

To use Emberflow in your Firebase Functions project, follow these steps:

  1. Install Emberflow in your 'functions' folder:
npm install emberflow
  1. Import and initialize Emberflow in your Firebase Functions index.ts file:
import * as admin from "firebase-admin";
import {dbStructure, Entity} from "./db-structure";
import {initializeEmberFlow} from "emberflow";
import {securityConfig} from "./security";
import {validatorConfig} from "./validators";
import {logics} from "./business-logics";

admin.initializeApp();
const {functionsConfig} = initializeEmberFlow(
  admin,
  dbStructure,
  Entity,
  securityConfig,
  validatorConfig,
  logics
);

Object.entries(functionsConfig).forEach(([key, value]) => {
  exports[key] = value;
});

This example assumes you have the necessary files (db-structure.ts, security.ts, validators.ts, and business-logics.ts) in your project. For reference on how to set up these files, you can check the src.sample-custom folder in the Emberflow library.

Readme

Keywords

none

Package Sidebar

Install

npm i @primeanalytiq/emberflow

Weekly Downloads

8

Version

1.3.53

License

none

Unpacked Size

599 kB

Total Files

119

Last publish

Collaborators

  • aris-i