Skip to content

Instantly share code, notes, and snippets.

@soonsam123
Created December 8, 2020 01:57
Show Gist options
  • Save soonsam123/45348e0c975321e7b7ddbdd41bfc81c4 to your computer and use it in GitHub Desktop.
Save soonsam123/45348e0c975321e7b7ddbdd41bfc81c4 to your computer and use it in GitHub Desktop.
const express = require("express");
+ const bodyParser = require("body-parser");
const dojosRoutes = require("./api/routes/dojos");
const app = express();
+ const jsonParser = bodyParser.json();
app.listen(8000);
+ app.use(jsonParser);
... // HEADER
app.use("/dojos", dojosRoutes);
... // ERROR IMPLEMENTATION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment