This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
remove body-parser package and use express.json() built-in middleware… #278
Open
ualiyou
wants to merge
252
commits into
microsoft:master
Choose a base branch
from
ualiyou:express
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
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
fix: copying issues
Bump tasks.json version from 0.10 to 2.00. Add default build task.
…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!
…ocumentation in README.md
…precated vscode-eslint v2 settings patch
Added SendGrid Username, Password, Port to .env.example
Added GitHub Actions CI Workflow
- `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!
➖ remove unused dependencies. Closes microsoft#272
Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.7.1 to 5.7.5. - [Release notes](https://github.com/Automattic/mongoose/releases) - [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md) - [Commits](Automattic/mongoose@5.7.1...5.7.5) Signed-off-by: dependabot[bot] <[email protected]>
… function in Express.It parses incoming requests with JSON payloads and is based on body-parser
@@ -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()); |
There was a problem hiding this comment.
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, :)
There was a problem hiding this comment.
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.
peterblazejewicz
suggested changes
May 10, 2020
There was a problem hiding this 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
Hi @ualiyou, I think you can merged this one based on @peterblazejewicz 's comment. :) |
brittanydrandolph
force-pushed
the
master
branch
from
June 24, 2022 15:41
fbc1328
to
1e15e8b
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… function in Express.It parses incoming requests with JSON payloads and is based on body-parser