Tag: express.js

  1. Setting up Express.js to Parse JSON body by default

    Sometimes you might have a client need to assume that they are always making requests with JSON body, without necessarily putting Content-Type header in their requests. //In your main index.js (or wherever you initialize express) var app = express(); //Using Express 4.x app.use(bodyParser.json({ type: '*/*'}…

    on node.js express.js javascript