UNPKG
nodecardcapture
Version:
latest (0.0.9)
0.0.9
read magnetic card from a card reader in python, managed by node
nodecardcapture
/
node-card-capture.js
12 lines
(8 loc)
•
304 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
'use strict'
let
exec =
require
(
'child_process'
).
execSync
var
cardCapture =
function
(
callback
) {
console
.
log
(
'The process is happeing in '
+ __dirname)
var
trackdata =
exec
(
'sudo python '
+ __dirname +
'/card-reader.py'
).
toString
(
'utf8'
)
callback
(trackdata) }
module
.
exports
= cardCapture