title: How to send static files from server without express
body: <p>I'm trying to build a web application that runs only on pure node js without express or other packages.</p>
  
  <p>I didn't find a good method for sending multiple files connected from the server.
  For example, send html,css and js file that are connected.
  Now, I can only send the html file.</p>
  
  <p>I have a folder named "design" with 3 files---> index.html,style.css,scipt.js</p>
  
  <p>*I really don't care what method you use, I just want to send more then 1 files connected to the client from the server.</p>
  
  <p>Thanks :) !</p>
  
  <pre><code>const http = require('http');
  const fs = require('fs');
  
  const server = http.createServer((req,res)=&gt;{
      if(req.url == '/')
      {
          const readStream = fs.createReadStream('./design/index.html');
          res.writeHead(200,{'Content-type': 'text/html'});
          readStream.pipe(res);
  
      }
  });
  
  server.listen('3000',()=&gt;console.log("Connected Succesfully"));
  </code></pre>