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
Post a Comment