# Uptime watch

Your sites checked every minute from your phone, and a push notification when one goes down and when it’s back.

## Get it

```sh
$ dukoi init uptime-watch
```

It makes a `uptime-watch` folder and deploys it. On the phone instead: **Try a template → Uptime watch → Deploy**.

## What you get

A page with the last 30 checks for each site. A site counts as down after two failed checks in a row, so one slow answer doesn’t wake you.

192.168.0.112:3006

-   Shop https://shop.example.com
    
    Down 3 min
-   Blog https://blog.example.com
    
    142 ms
-   Home router http://192.168.1.1
    
    8 ms

Alerts go through [ntfy](https://ntfy.sh), a free push app for Android and iOS with no account. The page shows a topic; subscribe to it in the app. To pick your own topic:

```sh
$ dukoi env set NTFY_TOPIC=my-long-hard-to-guess-topic
```

## Make it yours

Five files. You only need to touch one.

- `sites.js`: The sites to watch. Edit this one.
- `server.js`: Checks, alerts and the page
- `public/index.html`: The status page
- `package.json`: Its name and packages
- `README.md`: How to run it, in five minutes

Put your own sites in `sites.js`. Addresses on your Wi-Fi work too, which a server in the cloud can’t check:

```
export const sites = [
  { name: 'Shop', url: 'https://shop.example.com' },
  { name: 'Home router', url: 'http://192.168.1.1' },
]
```

```sh
$ dukoi deploy
```
