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

  • 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.

主站蜘蛛池模板: 神农架林区| 惠东县| 龙陵县| 苏尼特右旗| 教育| 蓬莱市| 松原市| 黄浦区| 临泽县| 沁阳市| 万荣县| 壤塘县| 彝良县| 塔城市| 航空| 全州县| 仲巴县| 太和县| 金昌市| 兰州市| 安远县| 安泽县| 清苑县| 丰城市| 靖宇县| 五原县| 怀柔区| 合水县| 兰溪市| 静安区| 麻城市| 济阳县| 曲靖市| 庆城县| 西吉县| 桂平市| 乐都县| 文水县| 霍邱县| 元朗区| 庄浪县|