title: How to decode/encode string to base64 in typescript express server
body: <p>I have an express server written in typescript.</p>
  
  <p>As <code>atob()</code> or <code>btoa()</code> works on browsers, on Nodejs.</p>
  
  <p>We generally use </p>
  
  <p><code>Buffer.from("some-string").toString('base64')</code> to encode string to base64.</p>
  
  <p>However, this doesn't seem to work when I am writing the code in TypeScript. I need some help with this.</p>