@itznotabug/appexpress-favicon
v0.0.3
Published
A favicon middleware for AppExpress.
Downloads
8
Readme
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 }));