Skip to content
Snippets Groups Projects
Commit 15f0fe90 authored by Aymeric Bernard's avatar Aymeric Bernard
Browse files

Begginning of script to read badge

parent 23da7d26
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@ node_modules/
build/
.cache/
.DS_Store
.idea
*.log
server/config.js
......
const { spawn } = require('child_process');
const child = spawn('/bin/bash', ['-c', 'nfc-poll | grep "UID " | cut -d: -f2 | sed "s/ / /g"']);
child.on('exit', (code, signal) => {
console.log(`child process exited with code ${code} and signal ${signal}`);
});
child.stdout.on('data', (data0) => {
const data = data0.toString().trim();
console.log(`child stdout: ${data}`);
});
child.stderr.on('data', (data0) => {
const data = data0.toString().trim();
console.error(`child stderr: ${data}`);
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment