0.1.0 • Published 11 months ago

ecmaserver v0.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

Ecmaserver

Ecmaserver is a Javascript Linux server controller.

This library provides a set of functions that are invoked over SSH on Linux servers so you don't have to deal with the intricacies of the installation itself.

Install

npm i ecmaserver

Usage

Each command returns an array with a state and an error. If the command is successful, the error object will be null, if not it will contain information about the error.

If a command fails, an error will be thrown and execution will be halted.

var server = ecmaserver({ host: 'firmalisten.no' })

var [state, err] = server.installNodeJS({ version: '22' })

state         // the state object
state.history // array of all the commands and its outputs
state.command // the last command executed
state.output  // the output from the last command

err           // the error object
err.message   // error message
err.command   // the command that failed
err.output    // the result from the command

Created by Eldøy Projects

0.1.0

11 months ago