https://github.com/faradayio/remote-task
Simple server for remotely running tasks and logging their output to papertrail
https://github.com/faradayio/remote-task
Last synced: 8 months ago
JSON representation
Simple server for remotely running tasks and logging their output to papertrail
- Host: GitHub
- URL: https://github.com/faradayio/remote-task
- Owner: faradayio
- License: mit
- Created: 2015-01-23T15:18:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-21T14:39:37.000Z (almost 11 years ago)
- Last Synced: 2025-09-30T05:24:17.256Z (8 months ago)
- Language: JavaScript
- Size: 189 KB
- Stars: 3
- Watchers: 12
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# remote-task
Simple server for remotely running tasks and logging their output to a given file
## Installation
```console
npm install remote-task
```
or
```console
npm install --save remote-task
```
## Usage
Server:
```javascript
var remoteTask = require('remote-task');
var server = remoteTask('tasks.log');
server.listen(3000);
```
Client:
```javascript
var remoteTask = require('remote-task');
var remoteControl = remoteTask.remoteStream(3000, '127.0.0.1'); //IP address is optional, arguments are passed to net.connect()
remoteControl.write(['cd', '/tmp']);
remoteControl.write(['touch', 'helloworld']);
remoteControl.write({end: true});
remoteControl.on('data', function(result){
console.log(result.status); //success, hopefully
});
```