execcommand

Executes a system command via the child_process module.

Usage no npm install needed!

<script type="module">
  import execcommand from 'https://cdn.skypack.dev/execcommand';
</script>

README

execCommand NPM version

A very simple wrapper for executing a system command in NodeJS, synchronously!

The wrapper is using https://github.com/hecomi/node-execsync.

Example

var execCommand = require("execCommand.js");
var command = execCommand("cat /sys/class/thermal/thermal_zone0/temp");
console.log(command);