title: How to compile nodejs project to executable include assets inside
body: <p>My project as basic as express starter. assets likes image put into public as root, then, template engine &quot;ejs&quot; into views as root. i succefully to compile to exe. but, the exe need to load assets from external. its not load from inside executable. i tell pkg in json to include file that need to include. i'm using PKG library</p>
  <pre><code>&quot;bin&quot;: &quot;index.js&quot;,
  pkg: {
    &quot;assets&quot;: [&quot;views/*&quot;, &quot;public/*&quot;],
    &quot;targets: [&quot;node16-win-x64&quot;],
    &quot;outputPath&quot;: &quot;dist&quot;
  }
  </code></pre>
  <p>index.js</p>
  <pre><code>const express = require('express');
  
  const app = express();
  const port = 80;
  app.use(express.static('public'));
  app.set('view engine', 'ejs');
  
  function index(req, res) {
      res.render('index')
  };
  
  app.get('/', index);
  
  app.listen(port, () =&gt; {
      console.log('Run')
  })
  </code></pre>