Created
December 8, 2020 01:57
-
-
Save soonsam123/45348e0c975321e7b7ddbdd41bfc81c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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