Skip to content

nneutrinno/framework-identifier

Repository files navigation

Framework Identifier

A package to detect which node web framework belongs that server, app or api instance.

Install

  • Use: require('framework-identifier')
  • Install: npm install --save framework-identifier
  • Use: require('framework-identifier')
  • Install: yarn add framework-identifier

Usage

Example

const frameworkIdentifier = require('framework-identifier')
const fastify = require('fastify')
const express = require('express')
const Hapi = require('@hapi/hapi')
const Koa = require('koa')



const fastifyApp = fastify()
const expressApp = express()
const koaApp = new Koa()
const hapiApp = Hapi.server()

console.log(frameworkIdentifier(fastifyApp)) // fastify
console.log(frameworkIdentifier(expressApp)) // express
console.log(frameworkIdentifier(koaApp)) // koa
console.log(frameworkIdentifier(hapiApp)) // hapi

License

Licensed under permissive MIT license

About

A package to detect which node web framework belongs that server, app or api instance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published