# make-express-case-sensitive

> Force express static to act case-sensitive, even on case-insensitive filesystems

Latest version **0.1.0** (published 2018-04-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install make-express-case-sensitive
pnpm add make-express-case-sensitive
yarn add make-express-case-sensitive
bun add make-express-case-sensitive
```

## 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.1.0 |
| Published | 2018-04-05 |
| First published | 2018-04-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Paul "Joey" Clark |
| Maintainers | joeytwiddle |
| Keywords | debug, develop, mac-osx, express, express-static |

## Links

- npm: https://www.npmjs.com/package/make-express-case-sensitive
- Repository: https://gitlab.com/joeytwiddle/make-express-case-sensitive
- Homepage: https://gitlab.com/joeytwiddle/make-express-case-sensitive.git#readme
- Issues: https://gitlab.com/joeytwiddle/make-express-case-sensitive.git/issues
- npm.io page: https://npm.io/package/make-express-case-sensitive

## Dependencies (1)

- [parseurl](https://npm.io/package/parseurl.md) ^1.3.2

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-04-05

## README

# make-express-case-sensitive

## What is it good for?

If you and your team develop on Windows or MacOS, you can get away with misnaming your filenames and assets with the wrong case, because the OS will still load a file with different case off the disk.  Even locally run tests will pass.  But when you deploy your files to a testing or production server which runs Linux, then the app will no longer be able to find the misnamed files!

This module will force the express static middleware to care about misnamed files, even if you are using a case-insensitive filesystem.  This will help you to catch errors before they leave your machine.

## How to use it?

We only enable it in development mode:

```js
var express = require('express');

var inDevelopment = (process.env.NODE_ENV || 'local') === 'local';

if (inDevelopment) {
    require('make-express-case-sensitive')(express);
}

// Go ahead and use express.static() as you normally would
// ...
```

Note that this will actually mutate the function at `express.static` so this will affect all references to `express.static` in other modules too, provided they execute after this code has run.

## Notes

To speed up situations where you have a lot of assets/files to load, this package keeps a cache of the status of each folder it reads, for 5 seconds.

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