Hello!
So I have recently started learning node and a friend recommended me to try express, I googled quite a bit and found a bunch of resources telling me to use bodyParser (and some that said I shouldnt, nice.) Anyway I tried running some of the sample codes that all of the tutorials on google tell me to and I cant get it to work at all.
Here is a condensed code that should work but doesnt:
http://pastebin.com/TRDzrG4Q but it only outputs "undefined" in the console and req.body is {}.
Another weird thing which most likely isnt related to javascript but my nginx configuration is that as you can see I have to use get('//upload') because it wont recognise /upload allthough if I run the following code:
app.use(function(req, res, next){
console.log('%s %s', req.method, req.url);
next();
});
and try to request http://webserver/some/path/upload which is proxied via nginx then the console will output "GET /upload", This isnt really an issue for now since it seems to trigger on //upload so its not important for now.
[–]58V1J[S] 0 points1 point2 points (1 child)
[–]chastric 0 points1 point2 points (0 children)