Reputation: 225
I will start by saying that I am new to node.js and can not figure what I messed up. I am attempting to follow an tutorial to build a basic skeleton structure that I can use for over and over again. I believe my problem is comes from my use of the express.static not serving up my files correctly. Basically I have server.js file with the following code:
app.configure(function() {
app.set('views', __dirname + '/server/views');
app.set('view engine', 'jade');
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(stylus.middleware(
{
src: __dirname + '/public',
compile: compile
}
));
app.use(express.static(__dirname + '/public'));
});
app.get('/partials/:partialPath', function(req, res) {
res.render('partials/' + req.params.partialPath);
})
I also have another file named scripts.jade with the following code:
script(type="text/javascript", src="/vendor/jquery/jquery.js")
script(type="text/javascript", src="/vendor/angular/angular.js")
script(type="text/javascript", src="/vendor/angular-resource/angular-resourse.js")
script(type="text/javascript", src="/vendor/angular-route/angular-route.js")
script(type="text/javascript", src="/app/app.js")
When I navigate to the web site (http://localhost:3030/)
I get the following text in my console and get a blank page in the browser:
I have seen several post about the using express.static but I still can't figure out what I messed up. Any help would be greatly appreciated.
Why does it appear that the server can not find the files even though I have them in the locations in the file tree.
Upvotes: 0
Views: 158
Reputation: 10145
Your express setup is fine, HTTP 304 means the browser requested content on server and node/express says is not modified:
http://www.checkupdown.com/status/E304.html
Sounds like your issue is with the client-side code.
Upvotes: 1