- In addition to built-in middleware, Express also has
an extensive list of third-party middleware
that is available to help you enhance your projects.
For the scope of this course,
there is not a package that aligns with our needs,
so we won't be installing any third-party middleware
at this time.
The Express documentation is a valuable source
of information for any needs and questions
that may arise when you're building a project.
The documentation has extensive information regarding
what is available and further information on how to install
and set up these modules, should you ever need them.
First is a list of middleware modules
maintained by the Express team.
Why is that significant?
When we are building applications
and using external modules,
it is important that the code is maintained and stable.
There are a lot of middleware packages available out there,
but they may not be maintained
and could possibly have security issues.
Within the list,
each module has additional information
regarding that particular module,
why you should use it, how to install, and more.
Let's take a look at the detailed information around the
body parser module.
Here we have the page devoted to body parser.
And if we scroll down a little bit,
we'll get more information regarding installation.
Typically, the installation is very straightforward.
NPM install and usually the module's name.
So here, no different.
We can see it's NPM install and then body parser.
One thing I want to know in regards to getting projects
set up with these modules is how they are imported.
Right below the installation is API.
And this denotes how the module would be imported
into the project.
You'll notice in the documentation that it is different from
how we are importing our modules in our project.
Here it is var bodyParser equals require body parser.
Please note that in this course, we are using ES6 syntax.
So in our case,
we'd say, import body parser from body parser.
Hopping back to the main list of middleware,
below the list of modules maintained by Express
is another list with popular middleware modules.
You'll see that they have a disclaimer that these modules
are not maintained by the Express team.
However, the fact that they are on the official Express site
is certainly a positive endorsement.