title: How to use Body Parser with import and not required? ES6
body: <p>I am working on a project that uses strictly imports, disabling me from using required statements. I am wondering how I can read the contents of a post request to my server using the import for Body Parser. </p>
  
  <p>'''</p>
  
  <pre><code>//jshint esversion:6
  
  // Require the needed NPMs
  
  import Radar from "radar-sdk-js";
  import express from "express";
  import bodyParser from "body-parser";
  import { dirname } from 'path';
  import { fileURLToPath } from 'url';
  
  
  
  const __dirname = dirname(fileURLToPath(import.meta.url));
  
  const app = express();
  
  app.use(bodyParser.json());
  app.use(bodyParser.urlencoded({extended: true}));
  app.use(express.static("public"));
  
  /*app.use(bodyParser.json({
          verify: (req, res, buf) =&gt; {
          req.rawBody = buf;
       }
  })*/
  
  app.get("/", function(req, res) {
  
    res.sendFile(__dirname + "/public/index.html");
  
  });
  
  app.post("/", function(req, res) {
  
        console.log(req.body);
        console.log(req.body.trackedName);
  </code></pre>
  
  <p>'''</p>