title: Node usb printer
body: <p><a href="https://i.stack.imgur.com/UH1uc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UH1uc.png" alt="enter image description here" /></a>Anyone knows how to set-up a USB printer for node js. I m not able to configure the interface for it .
  Here is my code</p>
  <pre><code>enter code here const ThermalPrinter = require(&quot;../node-thermal-printer&quot;).printer;
                  const Types = require(&quot;../node-thermal-printer&quot;).types;
                  const electron = typeof process !== 'undefined' &amp;&amp; process.versions &amp;&amp; 
                                    !!process.versions.electron;
  
                  async function testConnection () { 
  
                  let printer = new ThermalPrinter({
                  type: 'star',                                    
                  interface: &quot;Gold&quot; //name of the printer
                  });
                  printer.print(&quot;hi&quot;);
                  let isConnected = await printer.isPrinterConnected() 
                  console.log(&quot;Printer connected:&quot;, isConnected);
                  }
                   testConnection();
  </code></pre>