Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6c70cc4

Browse files
committed
remove body-parser (deprecated)
1 parent f5c8334 commit 6c70cc4

File tree

3 files changed

+26
-46
lines changed

3 files changed

+26
-46
lines changed

‎README.md

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,76 +6,58 @@ The diagram shows flow of how we implement User Registration, User Login and Aut
66
![jwt-token-authentication-node-js-example-flow](jwt-token-authentication-node-js-example-flow.png)
77

88
For more detail, please visit:
9-
> [Node.js + MongoDB: User Authentication & Authorization with JWT](https://bezkoder.com/node-js-mongodb-auth-jwt/)
9+
> [Node.js + MongoDB: User Authentication & Authorization with JWT](https://www.bezkoder.com/node-js-mongodb-auth-jwt/)
1010
1111
You may need to implement Refresh Token:
1212

1313
![jwt-refresh-token-node-js-example-flow](jwt-refresh-token-node-js-example-flow.png)
1414

15-
> [Node.js JWT Refresh Token with MongoDB example](https://bezkoder.com/jwt-refresh-token-node-js-mongodb/)
15+
> [Node.js JWT Refresh Token with MongoDB example](https://www.bezkoder.com/jwt-refresh-token-node-js-mongodb/)
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 example](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 example](https://bezkoder.com/angular-10-jwt-auth/)
23-
24-
> [Angular 11 JWT Authentication example](https://bezkoder.com/angular-11-jwt-auth/)
25-
26-
> [React JWT Authentication & Authorization (without Redux) example](https://bezkoder.com/react-jwt-auth/)
27-
28-
> [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/)
2923
3024
## More Practice:
31-
> [Node.js, Express & MongoDb: Build a CRUD Rest Api example](https://bezkoder.com/node-express-mongodb-crud-rest-api/)
25+
> [Node.js, Express & MongoDb: Build a CRUD Rest Api example](https://www.bezkoder.com/node-express-mongodb-crud-rest-api/)
26+
27+
> [Server side Pagination in Node.js with MongoDB and Mongoose](https://www.bezkoder.com/node-js-mongodb-pagination/)
3228
33-
> [Server side Pagination in Node.js with MongoDB and Mongoose](https://bezkoder.com/node-js-mongodb-pagination/)
29+
> [Node.js Express File Upload Rest API example](https://www.bezkoder.com/node-js-express-file-upload/)
3430
3531
Associations:
36-
> [MongoDB One-to-One relationship tutorial with Mongoose examples](https://bezkoder.com/mongoose-one-to-one-relationship-example/)
32+
> [MongoDB One-to-One relationship tutorial with Mongoose examples](https://www.bezkoder.com/mongoose-one-to-one-relationship-example/)
3733
38-
> [MongoDB One-to-Many Relationship tutorial with Mongoose examples](https://bezkoder.com/mongoose-one-to-many-relationship/)
34+
> [MongoDB One-to-Many Relationship tutorial with Mongoose examples](https://www.bezkoder.com/mongoose-one-to-many-relationship/)
3935
40-
> [MongoDB Many-to-Many Relationship with Mongoose examples](https://bezkoder.com/mongodb-many-to-many-mongoose/)
36+
> [MongoDB Many-to-Many Relationship with Mongoose examples](https://www.bezkoder.com/mongodb-many-to-many-mongoose/)
4137
4238
Fullstack:
43-
> [Vue.js + Node.js + Express + MySQL example](https://bezkoder.com/vue-js-node-js-express-mysql-crud-example/)
44-
45-
> [Vue.js + Node.js + Express + PostgreSQL example](https://bezkoder.com/vue-node-express-postgresql/)
46-
47-
> [Vue.js + Node.js + Express + MongoDB example](https://bezkoder.com/vue-node-express-mongodb-mevn-crud/)
48-
49-
> [Angular 8 + Node.js + Express + MySQL example](https://bezkoder.com/angular-node-express-mysql/)
39+
> [Vue.js + Node.js + Express + MongoDB example](https://www.bezkoder.com/vue-node-express-mongodb-mevn-crud/)
5040
51-
> [Angular 8 + Node.js + Express + PostgreSQL example](https://bezkoder.com/angular-node-express-postgresql/)
41+
> [Angular 8 + Node.js + Express + MongoDB example](https://www.bezkoder.com/angular-mongodb-node-express/)
5242
53-
> [Angular 8 + Node.js + Express + MongoDB example](https://bezkoder.com/angular-mongodb-node-express/)
43+
> [Angular 10 + Node.js + Express + MongoDB example](https://www.bezkoder.com/angular-10-mongodb-node-express/)
5444
55-
> [Angular 10 + Node.js + Express + MySQL example](https://bezkoder.com/angular-10-node-js-express-mysql/)
45+
> [Angular 11 + Node.js + Express + MongoDB example](https://www.bezkoder.com/angular-11-mongodb-node-js-express/)
5646
57-
> [Angular 10 + Node.js + Express + PostgreSQL example](https://bezkoder.com/angular-10-node-express-postgresql/)
47+
> [Angular 12 + Node.js + Express + MongoDB example](https://www.bezkoder.com/angular-12-mongodb-node-js-express/)
5848
59-
> [Angular 10 + Node.js + Express + MongoDB example](https://bezkoder.com/angular-10-mongodb-node-express/)
49+
> [Angular 13 + Node.js + Express + MongoDB example](https://www.bezkoder.com/mean-stack-crud-example-angular-13/)
6050
61-
> [Angular 11 + Node.js Express + MySQL example](https://bezkoder.com/angular-11-node-js-express-mysql/)
62-
63-
> [Angular 11 + Node.js + Express + PostgreSQL example](https://bezkoder.com/angular-11-node-js-express-postgresql/)
64-
65-
> [Angular 11 + Node.js + Express + MongoDB example](https://bezkoder.com/angular-11-mongodb-node-js-express/)
66-
67-
> [React + Node.js + Express + MySQL example](https://bezkoder.com/react-node-express-mysql/)
68-
69-
> [React + Node.js + Express + PostgreSQL example](https://bezkoder.com/react-node-express-postgresql/)
70-
71-
> [React + Node.js + Express + MongoDB example](https://bezkoder.com/react-node-express-mongodb-mern-stack/)
51+
> [React + Node.js + Express + MongoDB example](https://www.bezkoder.com/react-node-express-mongodb-mern-stack/)
7252
7353
Integration on same Server/Port:
74-
> [Integrate Angular 8 with Node.js Express](https://bezkoder.com/integrate-angular-8-node-js/)
54+
> [Integrate Angular 8 with Node.js Express](https://www.bezkoder.com/integrate-angular-8-node-js/)
55+
56+
> [Integrate Angular 10 with Node.js Express](https://www.bezkoder.com/integrate-angular-10-node-js/)
7557
76-
> [Integrate Angular 10 with Node.js Express](https://bezkoder.com/integrate-angular-10-node-js/)
58+
> [Integrate Angular 12 with Node.js Express](https://www.bezkoder.com/integrate-angular-12-node-js/)
7759
78-
> [Integrate React with Node.js Express](https://bezkoder.com/integrate-react-express-same-server-port/)
60+
> [Integrate React with Node.js Express](https://www.bezkoder.com/integrate-react-express-same-server-port/)
7961
8062
## Project setup
8163
```

‎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
const dbConfig = require("./app/config/db.config");
54

@@ -12,10 +11,10 @@ var corsOptions = {
1211
app.use(cors(corsOptions));
1312

1413
// parse requests of content-type - application/json
15-
app.use(bodyParser.json());
14+
app.use(express.json());
1615

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

2019
const db = require("./app/models");
2120
const Role = db.role;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /