Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-favicon

Package Overview
Dependencies
Maintainers
8
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-favicon

favicon bounce middleware for koa

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
132K
increased by2.21%
Maintainers
8
Weekly downloads
 
Created

What is koa-favicon?

The koa-favicon package is a middleware for Koa.js that serves a favicon for your web application. It is designed to be simple and efficient, allowing you to easily add a favicon to your Koa-based server.

What are koa-favicon's main functionalities?

Serve Favicon

This feature allows you to serve a favicon from a specified path. In this example, the favicon is located in the 'public' directory and is named 'favicon.ico'. The middleware is added to the Koa application using `app.use`.

const Koa = require('koa');
const favicon = require('koa-favicon');
const app = new Koa();

app.use(favicon(__dirname + '/public/favicon.ico'));

app.use(ctx => {
  ctx.body = 'Hello World';
});

app.listen(3000);

Other packages similar to koa-favicon

Keywords

FAQs

Package last updated on 27 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc