How to use NodeJS in a CRM widget?

How to use NodeJS in a CRM widget?

I created a widget in Zoho CRM which uses html to function. I used the CLI (using zet) to create the widget in my local environment. The issue is that I'm trying to execute a piece of code in NodeJS that adds a new item to an AWS S3 bucket but it doesn't seem possible to execute NodeJS code on a CRM widget. Here's the HTML code. 
  1. <!DOCTYPE html>
  2. <html>
  3.   <head>
  4.     <meta charset="UTF-8">
  5.   </head>
  6.   <body>
  7.     <form action="javascript:loadAPI(document.getElementById(myFile)">
  8.       <label>Upload a file to AWS S3</label>
  9.       <input type="file" id="myFile" name="filename">
  10.       <input type="submit">
  11.     </form>
  12.     <script type="text/javascript" src="myFunction.js">
  13.   </script>
  14.   </body>
  15. </html>
At the moment, if I want to add a new item to an AWS S3 bucket, I can use the following NodeJS code.

  1. const AWS = require('aws-sdk');
  2. AWS.config.update({region: 'us-east-2'});
  3. s3 = new AWS.S3({apiVersion: '2006-03-01'});

  4. // call S3 to retrieve upload file to specified bucket
  5. const file = "file.txt";
  6. const uploadParams = {Bucket: "test-folder", Key: '', Body: ''};


  7. const fs = require('fs');
  8. const fileStream = fs.createReadStream(file);
  9. fileStream.on('error', function(err) {
  10.   console.log('File Error', err);
  11. });
  12. uploadParams.Body = fileStream;
  13. const path = require('path');
  14. uploadParams.Key = path.basename(file);

  15. s3.upload (uploadParams, function (err, data) {
  16.   if (err) {
  17.     console.log("Error", err);
  18.   } if (data) {
  19.     console.log("Upload Success", data.Location);
  20.   }
  21. });
The problem is that I can't run this code on the widget since it uses normal javascript. I'm wondering if there's a way that I could run this NodeJS code from my widget app.