switch-dbi
v1.1.4
Published
DBI backend server for nsp installing by usb
Downloads
14
Readme
DBI backend module
Node.JS port of https://github.com/lunixoid/dbibackend
Install
npm i switch-dbi
Use:
const eventListenerExample = (eventTitle, data) => {
/*eventTitles = [
'connected',
'waitDevice',
'proccessCmdExit',
'proccessCmdList',
'proccessCmdFileRange',
'readFileRange',
'unknownCmd',
'error',
]*/
console.log(eventTitle, data)
};
const DBI = require('switch-dbi');
const dbi = new DBI(
[
'path/to/file1.nsp',
'path/to/file2.nsp'
],
eventListenerExample // optional
);
dbi
.start() // async
.catch(console.error);