title: How to run AngularJS 1 app locally using Node js?
body: <p>I worked with Angular 2+ app where I serve index.html file from the dist folder using node js server like this</p>
  
  <pre><code>var express = require('express');
  var bodyParser = require('body-parser');
  var path = require('path');
  var app = express();
  
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({extended: false}));
  app.use(express.static(path.join(__dirname, 'dist')));
  
  app.get('*'), (req, res) =&gt; {
      res.sendFile(path.join(__dirname, 'dist/index.html'));
  };
  
  app.get('/test', function(req, res){
      res.send('It worked!!!');
  });
  
  app.listen(5000);
  console.log('Server is running');
  </code></pre>
  
  <p>It worked very well for me with Angular 2+ apps, but when I tried same thing for AngularJS 1 app, its not working well for me</p>
  
  <p>I have some local files links in the index.html something like this</p>
  
  <pre><code>&lt;script src="components/angular-bootstrap/ui-bootstrap-tpls.js"&gt;
  </code></pre>
  
  <p>where components folder is bower folder which is inside dist folder itself. but this file is not able to serve on localhost, its throwing 404 for this file.</p>
  
  <p>I am trying this all to mock the api call, so that I can serve mock json data from my local, It will be very helpful if anyone finds what wrong I am doing here,</p>
  
  <p>Thanks </p>