# nonstop

> A self-updating service host

Latest version **0.1.9** (published 2015-10-09) · MIT license · 0 weekly downloads

## Install

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

Provides the command `nonstop`.

## 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.9 |
| Published | 2015-10-09 |
| First published | 2015-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 24 |
| Known vulnerabilities | 0 (+7 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | LeanKit |
| Maintainers | arobson |
| Keywords | nonstop, ci, cd, package |

## Links

- npm: https://www.npmjs.com/package/nonstop
- Repository: https://github.com/LeanKit-Labs/nonstop
- Issues: https://github.com/LeanKit-Labs/nonstop/issues
- npm.io page: https://npm.io/package/nonstop

## Dependencies (24)

- [when](https://npm.io/package/when.md) ^3.4.5
- [debug](https://npm.io/package/debug.md) ^2.0.0
- [fount](https://npm.io/package/fount.md) ^0.1.0
- [halon](https://npm.io/package/halon.md) ^0.3.2
- [hyped](https://npm.io/package/hyped.md) ^0.2.3
- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.0
- [moment](https://npm.io/package/moment.md) ^2.10.6
- [postal](https://npm.io/package/postal.md) ^1.0.6
- [rimraf](https://npm.io/package/rimraf.md) ^2.2.8
- [semver](https://npm.io/package/semver.md) ^4.1.0
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.2.3
- [machina](https://npm.io/package/machina.md) ^0.4.0-1
- [request](https://npm.io/package/request.md) ^2.60.0
- [autohost](https://npm.io/package/autohost.md) ~0.4.0
- [configya](https://npm.io/package/configya.md) ~0.2.0
- [drudgeon](https://npm.io/package/drudgeon.md) ~0.2.0
- [vinyl-fs](https://npm.io/package/vinyl-fs.md) ^0.3.13
- [globulesce](https://npm.io/package/globulesce.md) ~0.1.4
- [map-stream](https://npm.io/package/map-stream.md) 0.0.5
- [processhost](https://npm.io/package/processhost.md) ~0.2.0
- [nonstop-pack](https://npm.io/package/nonstop-pack.md) ~0.1.6
- [nonstop-index-client](https://npm.io/package/nonstop-index-client.md) ~0.1.5
- [moment-duration-format](https://npm.io/package/moment-duration-format.md) ^1.3.0

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 0.1.9 (latest) — 2015-10-09
- 0.1.8 — 2015-10-05
- 0.1.7 — 2015-08-30
- 0.1.6 — 2015-08-21
- 0.1.5 — 2015-08-21
- 0.1.4 — 2015-08-17
- 0.1.3 — 2015-08-17
- 0.1.2 — 2015-08-16
- 0.1.1 — 2015-07-27
- 0.1.0 — 2015-01-09

## README

## nonstop
Nonstop is a bootstrapper/service host that self-updates when new packages that match its configured parameters become available in the nonstop-index.

## Configuration
Nonstop can be used either as a library or as a command line interface.

As a command, you can configure it via a `bootstrap.json` file and environment variables.

> Note: environment variables take precendent over settings in the file.

### Bootstrap file
Defaults are shown here. The `index` property provides information necessary to contact the package index. The `package` property allows you to specify filtering information for the package. You shouldn't need to set the `architecture` or `platform` as those are detected for you.

```json
{
    "index": {
      "host": "localhost",
      "api": "/api",
      "frequency": 300000,
      "port": 4444,
      "ssl": false,
      "token": ""
    },
    "package": {
      "architecture": detected,
      "branch": "",
      "build": "",
      "owner": "",
      "platform": detected,
      "project": "",
      "releaseOnly": false,
      "version": "",
      "files": "./downloads"
    },
    service: {
      name: sysInfo.name,
      host: {
        ip: '',
        name: ''
      },
      port: {
        local: 9090,
        public: 9090
      },
      tolerance: 5000,
      failures: 1
    }
  }
```

### Environment Variables
| Group | Variable | Default |
|-------|-------------|---------|
| __Index__ | | |
| | INDEX_HOST | `"localhost"` |
| | INDEX_API | `"api"` |
| | INDEX_FREQUENCY | `5000` |
| | INDEX_PORT | `4444` |
| | INDEX_SSL | `false` |
| | INDEX_TOKEN | `""` |
| __Package__ | | |
| | PACKAGE_OWNER | `` |
| | PACKAGE_PROJECT | `` |
| | PACKAGE_BRANCH | `` |
| | PACKAGE_BUILD | `` |
| | PACKAGE_VERSION | `` |
| | PACKAGE__RELEASE_ONLY | `` |
| | PACKAGE_ARCHITECTURE | detected |
| | PACKAGE_PLATFORM | detected |
| | PACKAGE_FILES | `"./downloads"` |
| __service__ | | |
| | SERVICE_NAME | `"service name"` |
| | SERVICE_HOST_NAME | `"service name"` |
| | SERVICE_HOST_IP | `"unspecified` |
| | SERVICE_PORT_LOCAL | `9090` |
| | SERVICE_PORT_PUBLIC | `9090` |
| | SERVICE_FAILURES | `1` |
| | SERVICE_TOLERANCE | `5000` |

## Boot file - boot.yaml|boot.json
nonstop expects a boot file to be contained in any package it downloads which will provide the instructions for how it should start the packaged application. The files can be written in either JSON or YAML syntax.

The boot file consists of two sections: the service boot command and an optional pre-boot command set. The boot command simply tells nonstop how to start the packaged service while the optional pre-boot command set gets fed to [drudgeon](https://github.com/LeanKit-Labs/drudgeon). Both the boot command and pre-boot commands are expressed using `drudgeon`'s command syntax since it has a flexible means of supporting command and command set variation across platforms.

> Note: these examples are super arbitrary and should not be used to infer how you would actually create steps for an actual thing.

__JSON__
```javascript
{
  "boot": "node ./src/index.js",
  "preboot": {
    "one": {
      "win32": "gulp check-windows",
      "*": "gulp check"
    },
    "two": "node prep"
  }
}
```

__YAML__
```yaml
boot: "node ./src/index.js",
preboot:
  one:
    win32: "gulp check-windows"
    *: "gulp check"
  two: "node prep"
```

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