title: Read dynamic json data in Node js
body: <p>I have an express server.</p>
  
  <p>server.js</p>
  
  <pre><code>const express = require('express');
  const app = express();
  var json = require("./sample.js")
  app.use("/", (req, res)=&gt;{
    console.log("-----------&gt;", JSON.stringify(json));
    res.status(200).send(JSON.stringify(json));
  });
  
  app.listen(2222,()=&gt;{
    console.log(`Listening on port localhost:2222/ !`);
  });
  </code></pre>
  
  <p>sample.js</p>
  
  <pre><code>var offer = {
  "sample" : "Text",
  "ting" : "Toing"
  }
  
  module.exports = offer ;
  </code></pre>
  
  <p>Once i execute the server.js file, it fetches the json data from sample.js file. If I update the data of the sample.js while the server.js is still executing I dont get updated data. Is there any way
   to do the same, without stopping the execution of server.js.</p>