Serving static files with Node.js and AngularJS -


i have very simple node server, has 1 task : serve html file corresponding entry point of angularjs app.

but have problem : have no cache static resources, js or css files. how achieve ? node or angular problem ?

angularjs client-side framework, , has little serving of files. can not use express this:

var express = require('express'); var app = express();  app.use(express.static(__dirname + '/public'));  app.listen(process.env.port || 3000); 

as side note, may more useful serve static files nginx.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -