title: Variables between Node.js Server and Client
body: <p>I run a simple http server with Node.js:</p>
  
  <pre><code>var http = require('http');
  var fs = require('fs');
  var index = fs.readFileSync('index.html');
  var sensor = require('ds18x20');
  var temp = sensor.get('sensorID');
  
  http.createServer(function(req,res) {
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.end(index);
  }).listen(80);
  
  console.log(temp);
  </code></pre>
  
  <p>my index.html file:</p>
  
  <pre><code>&lt;html&gt;
     &lt;head&gt;
     &lt;/head&gt;
  &lt;body&gt;
  My temperature:
  //space for variable: temp
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now, I want to print the server-side variable: temp in my index.html file. But I have no idea how to do it.</p>
  
  <p>Maybe somebody can help me with the exchange of Variables from the server to the client. </p>