nsolid-command

1.0.1 • Public • Published

N|Solid Custom Command

Implement a N|Solid custom command for your application. For more information please visit our N|Solid documentation site.

Installation

npm install nsolid-command

Usage

Note: For the following example make sure you run your node process with --expose-gc

const nsolidCommand = require('nsolid-command')
 
nsolidCommand('gc', request => {
  global.gc()
  request.return({
    status: 'OK',
    type: 'gc'
  })
})
 
// or
 
nsolidCommand({
  name: 'gc',
  command: request => {
    global.gc()
    request.return({
      status: 'OK',
      type: 'gc'
    })
  }
})

From the N|Solid CLI

nsolid-cli custom --id <agentID> --name gc

Contributing

To submit a bug report, please create an issue at GitHub.

If you'd like to contribute code to this project, please read the CONTRIBUTING.md document.

Authors and Contributors

Julián Duque GitHub/julianduque Twitter/@julian_duque

License & Copyright

nsolid-command is Copyright (c) 2018 NodeSource and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    6
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    6
  • 1.0.0
    0

Package Sidebar

Install

npm i nsolid-command

Weekly Downloads

6

Version

1.0.1

License

MIT

Unpacked Size

8.55 kB

Total Files

7

Last publish

Collaborators

  • julianduque
  • nodesrc