title: How to load content type .ttf and .woff in nodejs?
body: <p>I am getting these errors when i load my html template in nodejs server the hole template is loaded correctly except icons:</p>
  
  <p>index.html:189 GET <a href="http://127.0.0.1:5050/assets/web/assets/mobirise-icons/mobirise-icons.ttf?spat4u" rel="nofollow noreferrer">http://127.0.0.1:5050/assets/web/assets/mobirise-icons/mobirise-icons.ttf?spat4u</a> net::ERR_ABORTED</p>
  
  <p>index.html:1 GET <a href="http://127.0.0.1:5050/assets/web/assets/mobirise-icons/mobirise-icons.woff?spat4u" rel="nofollow noreferrer">http://127.0.0.1:5050/assets/web/assets/mobirise-icons/mobirise-icons.woff?spat4u</a> net::ERR_ABORTED </p>
  
  <p>This is my server.js:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var http = require('http');
  var fs = require('fs');
  var path = require('path');
  var url = require('url');
  var mysql = require('mysql');
  
  http.createServer(function (request, response) {
      console.log('attente de requètes...');
   var q = url.parse(request.url, true).query;
   var filePath = '.' + request.url;
   console.log(request.url);
   if (filePath == './')
    filePath = './index.html';
   console.log(filePath); 
   var extname = path.extname(filePath);
   var contentType = 'text/html';
   switch (extname) {
    case '.js':
     contentType = 'text/javascript';
     break;
    case '.css':
     contentType = 'text/css';
     break;
   }
  
   
   fs.exists(filePath, function(exists) {
   
  
   if (exists) {
     fs.readFile(filePath, function(error, content) {
      if (error) {
       response.writeHead(500);
       response.end();
      }
      else {
       response.writeHead(200, { 'Content-Type': contentType });
       response.end(content, 'utf-8');
      }
     });
    }
    else {
     if(q.email!=null){
      console.log(q.email+" "+q.pswd);
      var con = mysql.createConnection({
        host: "127.0.0.1",
        user: "root",
        password: "",
        database: "Cyberwind"
      });
   
      con.connect(function(err) {
       if (err) throw err;
       con.query("INSERT INTO inscription (email, password, confirmpassword) VALUES ('"+q.email+"','"+q.pswd+"','"+q.confirmpassword+"')", function (err, result, fields) {
        if (err) throw err;
        response.end();
       });
      }); 
     }
     else {
      response.writeHead(404);
      console.log("iciici")
      response.end();
     }
    }
   });
   
  }).listen(5050);
  console.log('Server running at 5050');</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want to know how to added 2 cases in 'switch (extname)' where the contentType is (.ttf) or (.wof).</p>