# sensorthings

> Node implementation of the OGC SensorThings API

Latest version **0.6.0** (published 2017-01-31) · MPL-2.0 license · 0 weekly downloads

## Install

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

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2017-01-31 |
| First published | 2016-10-18 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 15 |
| Author | Mozilla Connected Devices |
| Maintainers | albertopq, ferjm |
| Keywords | sensorthings, ogc, sensors, sensorweb, mozilla |

## Links

- npm: https://www.npmjs.com/package/sensorthings
- Repository: https://github.com/mozilla-sensorweb/sensorthings
- Homepage: https://github.com/mozilla-sensorweb/sensorthings#readme
- Issues: https://github.com/mozilla-sensorweb/sensorthings/issues
- npm.io page: https://npm.io/package/sensorthings

## Dependencies (6)

- [pg](https://npm.io/package/pg.md) ^6.1.0
- [case](https://npm.io/package/case.md) ^1.4.1
- [express](https://npm.io/package/express.md) ^4.14.0
- [sequelize](https://npm.io/package/sequelize.md) ^3.24.4
- [morgan-body](https://npm.io/package/morgan-body.md) ^0.9.5
- [odata-parser](https://npm.io/package/odata-parser.md) github:mozilla-sensorweb/node-odata-parser

## Recent versions

- 0.6.0 (latest) — 2017-01-31
- 0.5.0 — 2017-01-18
- 0.0.10 — 2016-12-08
- 0.0.8 — 2016-12-07
- 0.0.7 — 2016-12-07
- 0.0.6 — 2016-12-01
- 0.0.5 — 2016-11-25
- 0.0.4 — 2016-11-25
- 0.0.3 — 2016-11-25
- 0.0.2 — 2016-11-25
- 0.0.1 — 2016-10-18

## README

# SensorThings API
[![License](https://img.shields.io/badge/license-MPL2-blue.svg)](https://raw.githubusercontent.com/mozilla-sensorweb/sensorthings/master/LICENSE)
[![Build Status](https://travis-ci.org/mozilla-sensorweb/sensorthings.svg?branch=master)](https://travis-ci.org/mozilla-sensorweb/sensorthings)
[![Coverage Status](https://coveralls.io/repos/github/mozilla-sensorweb/sensorthings/badge.svg)](https://coveralls.io/github/mozilla-sensorweb/sensorthings)

Node implementation of the OGC SensorThings API.

# Dependencies
* Nodejs 6
* PostgreSQL >9.4
* PostGIS

# Build
```shell
npm install
npm run build
```

# Usage
```js
const express      = require('express');
const SensorThings = require('../dist/sensorthings'); // or require('sensorthings')
                                                      // if you installed it via npm

var app = express();

const config = {
  db: {
    host: 'localhost',
    port: 5432,
    name: 'sensorweb',
    user: 'postgres',
    password: '12345678'
  }
};

app.use('/', SensorThings(config));

app.listen(8080, () => console.log('Running on localhost:8080'));
```

# Running the tests

```shell
npm run test-watch
```

# Running the example

```shell
npm run example
```

# OGC Compliance testing status

We are automatically running the [Test Suite for the OGC SensorThings API](https://github.com/opengeospatial/ets-sta10) with every commit and the results are published [here](https://mozilla-sensorweb.github.io/sensorthings/).

<img src='https://mozilla-sensorweb.github.io/sensorthings/overview-chart.svg'></img>

| Conformance Class                     | Reference | Test Status              |
|---------------------------------------|-----------|--------------------------| 
| Sensing Core                          | A.1       | 6 passed, 0 failed       |
| Filtering Extension                   | A.2       | 7 passed, 1 failed*      |
| Create-Update-Delete                  | A.3       | 9 passed, 0 failed       |
| Batch Request                         | A.4       | Tests not implemented    |
| Sensing MultiDatastream Extension     | A.5       | Tests not implemented    |
| Sensing Data Array Extension          | A.6       | Tests not implemented    |
| MQTT Extension for Create and Update  | A.7       | Tests not implemented    |
| MQTT Extension for Receiving Updates  | A.8       | Tests not implemented    |

* The failure is actually an OGC test suite issue: https://github.com/opengeospatial/ets-sta10/issues/35

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