# southern_lights_server

> A server for keeping track of GPIO states

Latest version **1.0.1** (published 2017-11-11) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-11-11 |
| First published | 2017-11-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| Author | Ian Foose |
| Maintainers | ianfoose |
| Keywords | GPIO, API, REST |

## Links

- npm: https://www.npmjs.com/package/southern_lights_server
- npm.io page: https://npm.io/package/southern_lights_server

## Dependencies (3)

- [express](https://npm.io/package/express.md) ^4.16.2
- [mongoose](https://npm.io/package/mongoose.md) ^4.12.5
- [relaxful](https://npm.io/package/relaxful.md) ^1.0.2

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-11-11

## README

# About
An API server for managing data for lights and groups and sending to subscribers.

![southern-lights-client-logo](https://fooseindustries.com/hosted/southern-lights.jpg)

## Install

### NPM

```npm install southern_lights_server```

### Manual

```var server = require('./server.js'); ```

## Use

To use, setup the server.  

Provide an options object with a port for the api.

The 'socket_server_url' is the address for the webhook to the socket broadcaster to broadcast to the client.

```js
var server = require('southern_lights_server');

server.createServer({port: 80, socket_url: 'socket_server_url' });
```

## SSL

Create a standard ssl option object and load your key and crt file, ca file is optional.  
Pass the sslOptions object as the ssl property for the server options.

```js
var server = require('southern_lights_server');
var fs = require('fs');

var sslOptions = {
  key: fs.readFileSync('path/to/key/file.key','utf8'),
  crt: fs.readFileSync('path/to/crt/file.crt','utf8')
};

server.createServer({port: 80, socket_url: 'socket_server_url', ssl: sslOptions });
```

## API Server

Get the current running instance of the API Server.

```js
var server = require('southern_lights_server');

var apiServer = server.getServer();
```

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