title: Setup AngularJS and NodeJS on Xampp Web server
body: <p>I'm working on creating a web application that uses AngularJS's data binding tactics to create a very nice frontend based on the backend data model. However, the backend data needs to come from incoming HTTP post requests, which I've figured out I'm going to use NodeJS to handle.</p>
  
  <p>Right now I'm using an Xampp local web server to do all the testing, and here is the file structure I've setup.</p>
  
  <p><a href="http://i.stack.imgur.com/rmNGO.png" rel="nofollow">setup</a></p>
  
  <p>As you can see, I've created a website directory for my website files, and when I visit <code>localhost/website</code>in my browser, the page loads the files I have. Currently, I have Angular up and running with this source code:</p>
  
  <pre><code>&lt;html&gt;
  
    &lt;head&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" href="style.css" /&gt;
      &lt;script src="script.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body ng-app&gt;
      &lt;h1&gt;{{80/5}}&lt;/h1&gt;
    &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>And the only text on the page is 16, as it is expected.</p>
  
  <p>My question is, how can I also have a NodeJS server running at the same location (<code>localhost/website</code>) so that when HTTP requests are sent to this web URL, they are intercepted and handled by Node, which can pass the results that are processed directly to Angular to handle the frontend stuff? Can you create the Node server inside of the <code>script.js</code> file I have? And what host/port would I use to grab the incoming HTTP requests?</p>