Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fchauvel/receiver
The receiver service of SensApp
https://github.com/fchauvel/receiver
Last synced: 13 days ago
JSON representation
The receiver service of SensApp
- Host: GitHub
- URL: https://github.com/fchauvel/receiver
- Owner: fchauvel
- License: mit
- Created: 2018-08-10T10:17:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-18T12:40:18.000Z (over 6 years ago)
- Last Synced: 2024-10-05T21:07:10.390Z (3 months ago)
- Language: JavaScript
- Size: 35.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1253b557fc7d4fa8bbb3d4255b459300)](https://app.codacy.com/app/fchauvel/receiver?utm_source=github.com&utm_medium=referral&utm_content=fchauvel/receiver&utm_campaign=Badge_Grade_Settings)
[![Build Status](https://travis-ci.org/fchauvel/receiver.svg?branch=master)](https://travis-ci.org/fchauvel/receiver)
[![Test Coverage](https://img.shields.io/codecov/c/github/fchauvel/receiver.svg)](https://codecov.io/gh/fchauvel/receiver)
![GitHub tag](https://img.shields.io/github/tag/fchauvel/receiver.svg)# SensApp::Receiver
This the front-end service that sensors hit when they post data to
SensApp. It is ia REST service that offers, the follwing endpoints:* POST at `/sensors/{sensor-id}/data`. Accept the data collected by the
sensors in JSON document. Here is an example of JSON payload:
[
{
"measurement": "test",
"tags": {
"source:" "integration tests",
},
"time": "2009-11-10T23:00:00Z",
"fields": {
"value": 0.64,
}
}
]* GET at `/receiver/about` returns some general informations about the
service. Useful to quickly test that the service is up and running.
# Build, Test and InstallationReceiver is a NodeJS application, so the requirements are NodeJS and
Git. Here is the installation procedure.1. Fetch the sources from the git repository:
$> git clone https://github.com/fchauvel/receiver.git
2. Install the application from the sources:
$> cd receiver
$> npm install3. Run the test suite:
$> node app/start &
$> npm test
$> kill $!# Start-up
This is a NodeJS application that starts with:
$> node app/start
SensApp.Receiver v0.0.0
Copyright (C) SINTEF -- 2018
------
Listening on localhost:3000 ...
## OptionsA couple of options can be set through the command line as follows:
$ node app/start --help
Usage: start [options]REST end-point where sensors can push data
Options:
-V, --version output the version number
-p, --port [int] Set the port on which Receiver listens (default: 3000)
-q, --task-queue [url] Set the URL of the task queue (default: amqp://task-queue:5672)
-h, --help output usage informationfranck@debian:~/Documents/mssep/receiver$