add web api access key

This commit is contained in:
Jay 2017-09-13 08:06:57 +08:00
parent 948541c1aa
commit 0aad260946

View File

@ -90,6 +90,9 @@ router
printer: {
serial: '',
feed: 8
},
api: {
secret: ''
}
}
@ -101,6 +104,8 @@ router
json.printer.serial = arr.tty
json.printer.feed = feed
json.api.secret = arr.secret || ''
let wconfig = await new Promise((resolve, reject) => {
fs.writeFile(path.resolve(process.env.PROJECT_ROOT, 'config.json'), JSON.stringify(json, null, 2), {
mode: 0o664,