title: C++ add-on does not run from inside express api route but works outside
body: <p>I'm using a C++ add-on on my Node.js server. I'm trying to get the decrypt function which I imported from the file to run when the api is hit but the decrypt does nothing. Instead, when I leave the decrypt outside the route as commented, it works exactly as intended.</p>
  <pre><code>require('nan')
  const { decrypt } = require('./build/Release/decrypt.node')
  
  const express = require('express')
  const fileupload = require('express-fileupload')
  const app = express()
  
  app.use(fileupload())
  
  // decrypt() works fine here
  
  
  app.post('/upload', (req, res) =&gt; {
      decrypt()
      res.send({
      status: true
    })
  })
  </code></pre>
  <p>I've also tried importing it inside the body of the route but it didn't help.</p>