How to use the body-parser.default function in body-parser

To help you get started, we’ve selected a few body-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Falconerd / discord-bot-github / build / src / index.js View on Github external
"use strict";
var express_1 = require("express");
var body_parser_1 = require("body-parser");
var app = express_1.default();
var port = process.env.PORT || 8080;
app.use(body_parser_1.default.json());
app.post("/", function (req, res) {
    console.log(req);
});
app.listen(port, function () {
    console.log("app listening on ", port);
});

body-parser

Node.js body parsing middleware

MIT
Latest version published 1 year ago

Package Health Score

76 / 100
Full package analysis