Closed xySaad closed 9 months ago
Not officially, but you can download and extract the binary from releases, execute it from your Node.js code and optionally stream the output to the console.. Something like this (untested):
const { spawn } = require('child_process');
const child = spawn('aternos-discord-bot');
// use child.stdout.setEncoding('utf8'); if you want text chunks
child.stdout.on('data', (chunk) => {
console.log(chunk);
});
// since these are streams, you can pipe them elsewhere
child.stderr.pipe(dest);
child.on('close', (code) => {
console.log(`child process exited with code ${code}`);
});
Source: https://stackoverflow.com/questions/20643470/execute-a-command-line-binary-with-node-js
Is there a way to start the aternos server using NodeJS?