This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

express-custom-mime-types

1.0.4 • Public • Published

This is a middleware to send files with a user-defined mime type.

Usage

The express-custom-mime-types package is simply a function, which accepts one parameter: options.

So far, options accepts one property: mimes. mimes is an associative array.

Each property of the associative array represents the file extension with the value being the mime-type.

In the following example, we have our express.js app serve *.underscore files as plain text.

var express = require('express');
var app = express();
app.configure(function () {
  // ...
  app.use(require('express-custom-mime-types')({
    mimes: {
      '.underscore': 'text/plain'
    }
  }));
  // ...
});

Readme

Keywords

none

Package Sidebar

Install

npm i express-custom-mime-types

Weekly Downloads

1

Version

1.0.4

License

MIT

Last publish

Collaborators

  • npm