open-index/open-npm huggingface dataset:
npm package: @firechecker/express
Description: Middleware for checking firebase authentication in Express APIs
Author: Gabriel Rufino
Latest version: 0.2.8

# Firechecker - Express

## Getting started

```
$ npm install --save express firebase-admin @firechecker/express
```

```js
const admin = require('firebase-admin')
const express = require('express')
const firechecker = require('@firechecker/express')

const serviceAccount = require('path/to/serviceAccountKey.json')

admin.initializeApp({
  credential: admin.credential.cert(serviceAccount)
})

const app = express()

app.use(firechecker())

app.get('/', (request, response) => {
  response.status(200).json({
    access: true
  })
})

app.listen(3000)
```
npm package: @firechecker/fastify
Description: Middleware for checking firebase authentication in Fastify APIs
Author: Gabriel Rufino
Latest version: 0.0.10

# Firechecker - Fastify

## Getting started

```
$ npm install --save fastify firebase-admin @firechecker/fastify
```

```js
const admin = require('firebase-admin')
const fastify = require('fastify')({
  logger: true
})
const firechecker = require('@firechecker/fastify')

const serviceAccount = require('path/to/serviceAccountKey.json')

admin.initializeApp({
  credential: admin.credential.cert(serviceAccount)
})

fastify.addHook('preHandler', firechecker())

fastify.get('/', function (request, reply) {
  reply.code(200).send({
    access: true
  })
})

fastify.listen(3000, function (error, address) {
  if (error) {
    fastify.log.error(error)
    process.exit(1)
  }

  fastify.log.info(`Server listening on ${address}`)
})
```