官术网_书友最值得收藏!

  • Node.js 6.x Blueprints
  • Fernando Monteiro
  • 138字
  • 2021-07-14 10:34:59

Installing additional middleware

As you can see in the previous sections, we used some middleware to display messages and the user icon using the gravatar. In this section, we will see how to install some very important modules for our application.

Since we created templates for the signin, signup, and profile pages, we will need to store the users with login and password.

These are the middleware that we will use for this task, with the definition for each one:

Open your terminal/shell and type:

npm install connect-flash connect-mongo express-session gravatar passport passport-local -save

Note

As we can see, we will use MongoDB to store user data; you can find more information about MongoDB at https://www.mongodb.org/, and the installation process at https://docs.mongodb.org/manual/installation/ . We assume that you already have MongoDB installed on your machine and it is running.

主站蜘蛛池模板: 习水县| 湄潭县| 南安市| 城步| 长泰县| 万载县| 泗水县| 新昌县| 迁安市| 和政县| 黔江区| 隆安县| 沛县| 武功县| 绿春县| 资兴市| 定南县| 乌审旗| 麻城市| 多伦县| 黄龙县| 明水县| 铜鼓县| 芦山县| 徐州市| 麻城市| 瓮安县| 涡阳县| 清新县| 尼玛县| 伽师县| 丹东市| 新干县| 凤阳县| 电白县| 镇远县| 达孜县| 将乐县| 枣强县| 安远县| 五大连池市|