Metadata-Version: 2.4
Name: hb-server
Version: 0.1.0
Summary: Single-project Django heartbeat service
Author-email: "J. Will Pierce" <willp@users.noreply.github.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/willp/heartbeat-backend
Project-URL: Repository, https://github.com/willp/heartbeat-backend
Project-URL: Documentation, https://github.com/willp/heartbeat-backend/blob/main/README.md
Project-URL: Issues, https://github.com/willp/heartbeat-backend/issues
Keywords: heartbeat,monitoring,nuclei,server,django
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 6.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Operating System :: OS Independent
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: django>=5.0
Requires-Dist: waitress>=3.0
Requires-Dist: cryptography>=41.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-django>=4.5.0; extra == "dev"
Dynamic: license-file

# hb-server

Heartbeat server backend (`hb_backend`).

## Installation

```bash
pip install hb-server
```

This installs:

- the Python package `hb_backend`
- the CLI command `hbserver`

## Running

```bash
hbserver --port 8333
# or
python3 -m hb_backend.hbserver --port 8333
```

## Database Setup

For pip-installed users, use `django-admin` with the settings module:

```bash
export DJANGO_SETTINGS_MODULE=hb_backend.settings

# Initialize the database
django-admin migrate

# Create an admin user
django-admin createsuperuser
```

By default, the database is stored at `./hbdb.sqlite3` in the current directory.
You can customize the database path with the `HEARTBEAT_DB_PATH` environment variable:

```bash
export HEARTBEAT_DB_PATH=/var/lib/hb-server/hbdb.sqlite3
django-admin migrate
```

For development from a git checkout:

```bash
cd src && python manage.py migrate
cd src && python manage.py createsuperuser
```

## Related projects

- `hb-client` (`hb_client`): heartbeat client library and CLI
- `hb-watcher` (`hb_watcher`): monitoring daemon

See [MIGRATION.md](MIGRATION.md) for upgrades from older package names.
