@itznotabug/appexpress-favicon

0.0.3 • Public • Published

AppExpress Favicon Middleware

This module allows you to use a favicon.ico in your Appwrite Functions with AppExpress.

The favicon.ico is saved in memory after the first request until the function container is removed.

Here's a Live Demo for reference!

Installation

Add the middleware like this -

npm install @itznotabug/appexpress-favicon

Usage

// import
import AppExpress from '@itznotabug/appexpress';
import favIcon from '@itznotabug/appexpress-favicon';

// setup
const express = new AppExpress();

// if you serve static content & 
// the favicon is in public dir then exclude favicon explicitly.
express.static('public', ['favicon.ico']);

express.middleware(favIcon({ iconPath: 'icons/favicon.ico', maxCacheDays: 30 }));

Readme

Keywords

none

Package Sidebar

Install

npm i @itznotabug/appexpress-favicon

Weekly Downloads

52

Version

0.0.3

License

Apache-2.0

Unpacked Size

4.84 kB

Total Files

3

Last publish

Collaborators

  • itznotabug