Skip to content

Commit 3a97911

Browse files
committed
remove body-parser
1 parent db1fb22 commit 3a97911

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,11 @@ You may need to implement Refresh Token:
1515
> [Node.js JWT Refresh Token example](https://bezkoder.com/jwt-refresh-token-node-js/)
1616
1717
Working with Front-end:
18-
> [Vue.js JWT Authentication with Vuex and Vue Router](https://bezkoder.com/jwt-vue-vuex-authentication/)
18+
> [Vue](https://www.bezkoder.com/jwt-vue-vuex-authentication/)
1919
20-
> [Angular 8 JWT Authentication with HttpInterceptor and Router](https://bezkoder.com/angular-jwt-authentication/)
20+
> [Angular 8](https://www.bezkoder.com/angular-jwt-authentication/) / [Angular 10](https://www.bezkoder.com/angular-10-jwt-auth/) / [Angular 11](https://www.bezkoder.com/angular-11-jwt-auth/) / [Angular 12](https://www.bezkoder.com/angular-12-jwt-auth/) / [Angular 13](https://www.bezkoder.com/angular-13-jwt-auth/)
2121
22-
> [Angular 10 JWT Authentication with HttpInterceptor and Router](https://bezkoder.com/angular-10-jwt-auth/)
23-
24-
> [Angular 11 JWT Authentication with HttpInterceptor and Router](https://bezkoder.com/angular-11-jwt-auth/)
25-
26-
> [Angular 12 JWT Authentication with HttpInterceptor and Router](https://bezkoder.com/angular-12-jwt-auth/)
27-
28-
> [React JWT Authentication & Authorization (without Redux) example](https://bezkoder.com/react-jwt-auth/)
29-
30-
> [React Redux JWT Authentication & Authorization example](https://bezkoder.com/react-redux-jwt-auth/)
22+
> [React](https://www.bezkoder.com/react-jwt-auth/) / [React + Redux](https://www.bezkoder.com/react-redux-jwt-auth/)
3123
3224
## More Practice:
3325
> [Build Node.js Rest APIs with Express, Sequelize & MySQL](https://bezkoder.com/node-js-express-sequelize-mysql/)
@@ -49,11 +41,15 @@ Deployment:
4941
> [Deploying/Hosting Node.js app on Heroku with MySQL database](https://bezkoder.com/deploy-node-js-app-heroku-cleardb-mysql/)
5042
5143
Integration on same Server/Port:
52-
> [Integrate Angular 8 with Node.js Express](https://bezkoder.com/integrate-angular-8-node-js/)
44+
> [Integrate Vue with Node.js Express](https://www.bezkoder.com/serve-vue-app-express/)
45+
46+
> [Integrate Angular 8 with Node.js Express](https://www.bezkoder.com/integrate-angular-8-node-js/)
47+
48+
> [Integrate Angular 10 with Node.js Express](https://www.bezkoder.com/integrate-angular-10-node-js/)
5349
54-
> [Integrate Angular 10 with Node.js Express](https://bezkoder.com/integrate-angular-10-node-js/)
50+
> [Integrate Angular 12 with Node.js Express](https://www.bezkoder.com/integrate-angular-12-node-js/)
5551
56-
> [Integrate React with Node.js Express](https://bezkoder.com/integrate-react-express-same-server-port/)
52+
> [Integrate React with Node.js Express](https://www.bezkoder.com/integrate-react-express-same-server-port/)
5753
5854
## Project setup
5955
```

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"license": "ISC",
1818
"dependencies": {
1919
"bcryptjs": "^2.4.3",
20-
"body-parser": "^1.19.0",
2120
"cors": "^2.8.5",
2221
"express": "^4.17.1",
2322
"jsonwebtoken": "^8.5.1",

server.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const express = require("express");
2-
const bodyParser = require("body-parser");
32
const cors = require("cors");
43

54
const app = express();
@@ -11,10 +10,10 @@ var corsOptions = {
1110
app.use(cors(corsOptions));
1211

1312
// parse requests of content-type - application/json
14-
app.use(bodyParser.json());
13+
app.use(express.json());
1514

1615
// parse requests of content-type - application/x-www-form-urlencoded
17-
app.use(bodyParser.urlencoded({ extended: true }));
16+
app.use(express.urlencoded({ extended: true }));
1817

1918
// database
2019
const db = require("./app/models");

0 commit comments

Comments
 (0)