Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@inpassor/firebase-application

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inpassor/firebase-application

Firebase application

Source
npmnpm
Version
0.1.8
Version published
Maintainers
1
Created
Source

Firebase application

Installation

npm install @inpassor/firebase-application --save

Usage

import { firebaseApplication } from '@inpassor/firebase-application';
import { ServerConfig, Component } from '@inpassor/node-server';
import { VALID_MEMORY_OPTIONS } from 'firebase-functions';

class DemoComponent extends Component {
    public get(): void {
        console.log(this.request.params);
        this.send(200, 'This is the DemoComponent GET action');
    }
}

const config: ServerConfig = {
    headers: {
        'Access-Control-Allow-Methods': 'OPTIONS, GET',
        'Access-Control-Allow-Credentials': 'true',
        'Access-Control-Allow-Headers': 'content-type, authorization',
    },
    sameOrigin: true,
    routes: [
        {
            path: 'demo/:arg?',
            component: DemoComponent,
        },
    ],
};

export const firebaseFunction = firebaseApplication(config, {
    timeoutSeconds: 10,
    memory: VALID_MEMORY_OPTIONS['256MB'],
});

Keywords

firebase

FAQs

Package last updated on 04 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts