Currently, I am using an express server that is written in typescript.
While atob()
and btoa()
function well within browsers, they do not work on Nodejs environment.
Typically, we rely on
Buffer.from("some-string").toString('base64')
method to encode strings into base64 format.
Unfortunately, when I attempt to implement this in TypeScript, it does not seem to be functioning properly. Any guidance on resolving this issue would be greatly appreciated.