louis49 / androidtv-remote

MIT License
68 stars 23 forks source link

save cert #9

Closed Ganime422 closed 2 years ago

Ganime422 commented 2 years ago

hello

is there a way to save the cert afterthe first pairing and reuse later so I won't need to do the pairing process again? I saw the method getCertificate() but it looks like it's used just to reconnect or something like that, it's not saving the cert into a .pem file.

thanks

louis49 commented 2 years ago

Yes, you can use fs.writeFileSync (https://nodejs.org/api/fs.html) with cert and key. Save it by naming it cert.pem and key.pem