Added comments and readme
This commit is contained in:
parent
1d632252bf
commit
e25c8606d9
8 changed files with 252 additions and 16 deletions
|
|
@ -1,13 +1,23 @@
|
|||
// CLI-Controller (Testdatei)
|
||||
// Zuständig für die Verarbeitung von Kommandozeilen-Befehlen des Scoreboards.
|
||||
// Aktuell nur ein Funktionstest mit einem einfachen `ls`-Befehl.
|
||||
|
||||
const exec = require('node:child_process');
|
||||
|
||||
// run the `ls` command using exec
|
||||
// Testaufruf: Listet den Inhalt des aktuellen Verzeichnisses auf,
|
||||
// um zu prüfen, ob child_process.exec korrekt funktioniert.
|
||||
exec('ls ./', (err, output) => {
|
||||
// once the command has completed, the callback function is called
|
||||
if (err) {
|
||||
// log and return if we encounter an error
|
||||
console.error("could not execute command: ", err)
|
||||
return
|
||||
}
|
||||
// log the output received from the command
|
||||
console.log("Output: \n", output)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue