title: AngularJS , Node.js, ExpressJS application integration issue
body: <p>I have created a RESTful service using Node.js and ExpressJS. Now I would like to implement View part. For this I have chosen AngularJS. </p>
  
  <p>Problem here is, I am not sure how to organize folder structure and how to integrate AngularJS with Node.js and ExpressJS. </p>
  
  <p>I watched this video, but for this no sample source code available. </p>
  
  <p><a href="https://www.youtube.com/watch?v=T-luUYq_obQ" rel="nofollow noreferrer">Let's Get CRUDdy: AngularJS and Node.js Ferrari Example</a></p>
  
  <p><strong>Project folder structure</strong> </p>
  
  <p><img src="https://i.stack.imgur.com/3TCez.png" alt="enter image description here"></p>
  
  <p><strong>ExpressJS file</strong></p>
  
  <pre><code>var express = require('express'),
  http = require('http'),
  path = require('path'),
  photos = require('./routes/photos');
  
  var app = express();
  
  app.configure(function () {
      app.use(express.logger('dev'));     /* 'default', 'short', 'tiny', 'dev' */
      app.use(express.bodyParser());
      app.use(app.router);
  });
  
  app.get('/photos', photos.findAll);
  app.get('/view1', photos.index);
  </code></pre>
  
  <p><strong>AngularJS:</strong></p>
  
  <pre><code> // Declare app level module which depends on filters, and services
   angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers']).
    config(['$routeProvider', function($routeProvider) {
      $routeProvider.when('/view1', {templateUrl: 'partials/partial1.html', controller: 'MyCtrl1'});
      $routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: 'MyCtrl2'});
      $routeProvider.otherwise({redirectTo: '/view1'});
    }]);
  </code></pre>
  
  <p>When I hit url <a href="http://www.domain/view1" rel="nofollow noreferrer">http://www.domain/view1</a>, it should display <code>index.html</code>. But I am getting 404 code.</p>
  
  <p>Please let me know if you need more info on it.</p>