angularjs - static resource not loaded in node app.js file -


my app.js below

var express = require('express'); var path = require('path'); var bodyparser = require('body-parser'); var mongoose = require('mongoose');                         //add mongo support mongoose.connect('mongodb://localhost/flappernews');        //connect mongo  var index = require('./routes/index');  var app = express();  // view engine setup app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'ejs');  app.use(bodyparser.json()); app.use(bodyparser.urlencoded({ extended: false })); app.use(express.static(path.join(__dirname, 'public')));  //rout views app.use('/', index);  app.get('/', function (req, res) {     res.send('application started');     console.log("application started.") }); app.listen(3000);  module.exports = app; 

my directories follows root -> node_modules -> resource root -> public -> javascripts -> angularapp.js got following error

enter image description here

i think, file angularapp.js available in url http://localhost:3000/javascripts/angularapp.js


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -