Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

remove body-parser package and use express.json() built-in middleware… #278

Open
wants to merge 252 commits into
base: master
Choose a base branch
from

Conversation

ualiyou
Copy link

@ualiyou ualiyou commented Apr 10, 2020

… function in Express.It parses incoming requests with JSON payloads and is based on body-parser

Bowden Kelly and others added 30 commits May 9, 2017 14:01
Update references from bowdenk7 repo to Microsoft repo
added package-lock for npm5 and fixed bug with flash messages
Added `build` `preLaunchTask` for debug configuration
Removed duplication in npm scripts `serve` and `watch`
…MaxOptions'.

fix err TypeScript-Node-Starter/src/controllers/api.ts[6, 9]: missing whitespace, 8 files
fix bugs of issue 15
fit  bugs of issue 15 and some other bugs caused by tslint
port changes from PR microsoft#11 and update package.lock from latest npm version
Bump tasks.json version from 0.10 to 2.00. Add default build task.
Orta and others added 25 commits August 27, 2019 10:55
…rn/eslint-utils-1.4.2

Bump eslint-utils from 1.4.0 to 1.4.2
Use update indexes access in Mongoose configuration. Fixes microsoft#225
- upgrade to latest packages
- cast `req.user` as `UserDocument`
- update logger to use latest Winston syntax
- disable `no-inferrable-types`, Mongoose use unified topology

Thx to @CarlosSolrac
ESLint, no any, no inferrable types, unused vars - warning

thx to @GrayStrider
…e Mac OS

Document use of the home directory on macOS 10.15 and above
Thanks to @memasdeligeorgakis
- remove @types/dotenv
- dotenv 8.1.0 > 8.2.0
- @types/connect-mongo 0.0.43 > 3.0.0
- concurrently 4.1.2 > 5.0.0

Thanks!
Update node-sass to enable it to compile on the Mac when using Node v13.2.0

Thanks to @CarlosKlapp
This updates Jest and its dependencies, removing the warning about the left-pad module deprecation.

Thanks!
…precated

vscode-eslint v2 settings patch
Added SendGrid Username, Password, Port to .env.example
- `request`
- `request-promise`

`request` first appeared as part of initial commit but it seems to be
left-over from non commited implementation:
https://git.io/JvgNV
`request-promise` was added in different PR but it seems without related
code:
https://git.io/JvgN6

/cc @naknode

Thanks!
… function in Express.It parses incoming requests with JSON payloads and is based on body-parser
@msftclas
Copy link

msftclas commented Apr 10, 2020

CLA assistant check
All CLA requirements met.

@@ -42,8 +41,7 @@ app.set("port", process.env.PORT || 3000);
app.set("views", path.join(__dirname, "../views"));
app.set("view engine", "pug");
app.use(compression());
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.json());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
app.use(express.json());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));

Otherwise the login is broken, :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the property extended: true is default now. So we might even be able to just use app.use(express.urlencoded()); if desired.

Copy link
Collaborator

@peterblazejewicz peterblazejewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK, url encoded are required for forms

@daveydee33
Copy link

Hi @ualiyou, I think you can merged this one based on @peterblazejewicz 's comment. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet