This commit is contained in:
Wolfgang Hottgenroth 2018-08-01 14:44:46 +02:00
commit 6d68062181
Signed by: wn
GPG Key ID: B586EAFCDF2F65F4
4 changed files with 107 additions and 0 deletions

35
.gitignore vendored Normal file
View File

@ -0,0 +1,35 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
# dependencies
/node_modules
/bower_components
# IDEs and editors
/.idea
/.vscode
.project
.classpath
.c9/
*.launch
.settings/
# misc
/.sass-cache
/connect.lock
/coverage/*
/libpeerconnection.log
npm-debug.log
testem.log
/typings
# e2e
/e2e/*.js
/e2e/*.map
#System Files
.DS_Store
Thumbs.db

18
mqttToInflux.service Normal file
View File

@ -0,0 +1,18 @@
[Unit]
Description=mqttToInflux
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
GuessMainPID=yes
ExecStart=/usr/bin/npm start -- -c MqttToInflux-Prod.conf
ExecStop=kill -SIGINT $mainpid
Restart=on-failure
WorkingDirectory=/opt/services/MqttToInflux
[Install]
Alias=mqttToInflux
WantedBy=multi-user.target

31
package.json Normal file
View File

@ -0,0 +1,31 @@
{
"name": "mqtt_to_influx",
"version": "1.0.0",
"description": "MQTT to InfluxDB Gateway",
"main": "dist/main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc -p ./",
"start": "node dist/main.js"
},
"author": "Wolfgang Hottgenroth",
"license": "ISC",
"repository": {
"type": "git",
"url": "git@gitlab.com:wolutator/MqttToInflux.git"
},
"devDependencies": {
"@types/command-line-args": "^5.0.0",
"@types/moment": "^2.13.0",
"@types/mqtt": "0.0.34",
"@types/node": "^7.0.14",
"typescript": "^2.3.1"
},
"dependencies": {
"chalk-console": "^1.0.1",
"command-line-args": "^5.0.2",
"commander": "^2.15.1",
"moment": "^2.22.1",
"mqtt": "^2.6.2"
}
}

23
tsconfig.json Normal file
View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"lib": ["es2015"],
"strictNullChecks": true,
"noImplicitAny": true,
"noEmitOnError": true,
"outDir": "dist",
"typeRoots": [
"node_modules/@types"
]
},
"include": [
"src/**/*.*"
],
"exclude": [
"node_modules",
"dist"
]
}