You don&#x27;t need to create the whole page structure like in the example though. html, head and body tags are optional under certains conditions. [1]<p>I guess you could just write the example code like this :<p><pre><code>  &lt;!doctype html&gt;
  &lt;script src=&quot;gpio.js&quot;&gt;&lt;&#x2F;script&gt;
  &lt;script&gt;
  var v = 0;
  GPIO.getPort(196).then(
    function(port) {
      setInterval(toggleLight, 1000, port);
    }
  );
  function toggleLight(port){
    v = v ? 0 : 1;
    port.write(v);
  }
  &lt;&#x2F;script&gt;
</code></pre>
Just having the script tags would also probably works in most browsers but it wouldn&#x27;t be standard compliant (if you care about it...).<p>[1] <a href="http:&#x2F;&#x2F;www.w3.org&#x2F;TR&#x2F;html-markup&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.w3.org&#x2F;TR&#x2F;html-markup&#x2F;</a>