# nomiseco

> Nodejs middleware for serving compressed files

Latest version **0.0.2** (published 2019-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install nomiseco
pnpm add nomiseco
yarn add nomiseco
bun add nomiseco
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-09-04 |
| First published | 2019-09-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | pandamakes |

## Links

- npm: https://www.npmjs.com/package/nomiseco
- Repository: https://github.com/xgui3783/nomiseco
- Homepage: https://github.com/xgui3783/nomiseco#readme
- Issues: https://github.com/xgui3783/nomiseco/issues
- npm.io page: https://npm.io/package/nomiseco

## Recent versions

- 0.0.2 (latest) — 2019-09-04
- 0.0.1 — 2019-09-04

## README

# nomiseco

Nodejs middleware for serving compressed files

## Getting Started

This package does not compress your files on the fly. You will need to generate static .gz and .br files, for example:

```shell
$ cd /path/to/you/static/files
$ for f in $(find . -type f); do gzip < $f > $f.gz && brotli < $f > $f.br; done
```

### Prerequisites

nodejs
express

### Installing


```
npm install --save nomiseco
```

## Running the tests

```
npm run test
```

## Deployment

### Basic Usage

```js
const app = require('express')()
const path = require('path')
const { compressionMiddleware } = require('nomiseco')

const publicPath = path.join(__dirname, 'public')

console.log(process.env.NODE_ENV) // prints `production`
// by default, the middleware only takes effect if NODE_ENV is set to production

app.use(
  compressionMiddleware,
  express.static(publicPath)
)
```

## License

MIT

---
_Source: https://npm.io/package/nomiseco · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
