I\'m trying to upload any file using Multer package. It\'s working fine when I use following code in my server.js file.
server.js
var express
Multer is a middleware so you can pass it like this :
app.post('/test/route', multer({...options...}), module.someThing)
or
app.post('/test/route', multer({...options...}), function(req, res){ ........some code ...... });