tcp-background-notifier
Advanced tools
Comparing version
exports.start = () => { | ||
var cmd = require("node-cmd"); | ||
var background = require('background-process'); | ||
var path = require("path"); | ||
cmd.run("node " + path.join(__dirname, "starter.js")); | ||
return background.start(path.join(__dirname, 'backgroundtask.js')); | ||
} |
{ | ||
"name": "tcp-background-notifier", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "A package that starts a node.exe background instance with an tcp server to create notifications on port 7070", | ||
@@ -21,5 +21,4 @@ "main": "index.js", | ||
"background-process": "^1.0.0", | ||
"node-cmd": "^3.0.0", | ||
"node-notifier": "^8.0.0" | ||
} | ||
} |
# tcp-background-notifier | ||
tcp-background-notifier is a npm package that runs a tcp server as a new background task to recive reqests on port 7070 and creates a windows or mac notification. It uses [background-process](https://www.npmjs.com/package/background-process), [node-cmd](https://www.npmjs.com/package/node-cmd) and [node-notifier](https://www.npmjs.com/package/node-notifier). | ||
tcp-background-notifier is a npm package that runs a tcp server as a new background task to recive reqests on port 7070 and creates a windows or mac notification. It uses [background-process](https://www.npmjs.com/package/background-process) and [node-notifier](https://www.npmjs.com/package/node-notifier). | ||
@@ -19,3 +19,3 @@ ## Installation | ||
tcpnotifier.start(); # starts the tcp server to listen on port 7070 | ||
const pid = tcpnotifier.start(); # starts the tcp server to listen on port 7070 and returns the PID(ProcessID) | ||
``` | ||
@@ -46,2 +46,3 @@ Send following json array over tcp to port **7070** and the ip adress from the machine you've started the node js code from to create a notification: | ||
``` | ||
This library also works with [electron](https://www.electronjs.org/). Just implement the library as show in the first example just after the electron imports. | ||
@@ -48,0 +49,0 @@ ## Donations |
2
-33.33%56
1.82%4
-20%60
-3.23%- Removed
- Removed