# is-heroku

> Check if your code is running on Heroku

Latest version **3.0.0** (published 2022-02-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-heroku
pnpm add is-heroku
yarn add is-heroku
bun add is-heroku
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2022-02-23 |
| First published | 2014-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.18.0 \|\| >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 2.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 19 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | heroku, is, check, detect, env, environment |

## Links

- npm: https://www.npmjs.com/package/is-heroku
- Repository: https://github.com/sindresorhus/is-heroku
- Homepage: https://github.com/sindresorhus/is-heroku#readme
- Issues: https://github.com/sindresorhus/is-heroku/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/is-heroku

## Alternatives

- [replicas-cli](https://npm.io/package/replicas-cli.md) — 3.0K weekly downloads
- [env-contract](https://npm.io/package/env-contract.md) — 133 weekly downloads
- [@openveo/api](https://npm.io/package/@openveo/api.md) — 61 weekly downloads
- [@ryniaubenpm2/cumque-error-reiciendis](https://npm.io/package/@ryniaubenpm2/cumque-error-reiciendis.md) — 54 weekly downloads
- [ts-global-type-extra](https://npm.io/package/ts-global-type-extra.md) — 11 weekly downloads

## Recent versions

- 3.0.0 (latest) — 2022-02-23
- 2.0.0 — 2018-03-22
- 1.0.1 — 2014-08-01
- 1.0.0 — 2014-07-20

## README

# is-heroku

> Check if your code is running on Heroku

## Install

```sh
npm install is-heroku
```

## Usage

```js
import isHeroku from 'is-heroku';

// On your local computer
console.log(isHeroku);
//=> false

// On Heroku
console.log(isHeroku);
//=> true
```

Add an [environment variable](https://devcenter.heroku.com/articles/config-vars) first to improve the detection:

```sh
heroku config:set HEROKU=1
```

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