title: Does angularjs template need to be routed through nodejs backend?
body: <p>I'm using node.js to host my angular website. My angular directive is not working properly because it cannot be displayed when I run my website.</p>
  
  <p>Node http server is used to handle the routes. With <code>console.log(req.url)</code> I'm able to see all requests urls, but there isn't one that should look like <code>/app-get.html</code> :</p>
  
  <pre><code>http.createServer((req, res) =&gt; {
      console.log(req.url)
      if(req.url == '/'){
          fs.readFile('./src/index.html', (err, file) =&gt; {
              res.writeHead(200, {'Content-Type': 'text/html'})
              res.write(file)
              res.end()
          })
      }
      if(req.url == '/angular.min.js'){
          fs.readFile('./src/angular.min.js', (err, file) =&gt; {
              res.writeHead(200, {'Content-Type': 'application/javascript'})
              res.write(file)
              res.end()
          })
      }
  }).listen(9999)
  </code></pre>
  
  <p>Can I even use templateUrl in angular directive to load html file without configuring server route for that file (<code>app-get.html</code>)?</p>
  
  <pre><code>app.directive("getApp", function() {
      return {
          templateUrl: 'app-get.html'
      }
  })
  </code></pre>