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

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

主站蜘蛛池模板: 柏乡县| 汤阴县| 青田县| 儋州市| 平罗县| 云梦县| 德格县| 凯里市| 龙州县| 泰宁县| 武宣县| 大冶市| 昔阳县| 武威市| 醴陵市| 三穗县| 济南市| 登封市| 和田县| 新建县| 呼图壁县| 高雄县| 托里县| 峨山| 惠州市| 孟州市| 涪陵区| 河西区| 鄂尔多斯市| 离岛区| 陆河县| 宜君县| 永嘉县| 宝应县| 峨眉山市| 延安市| 上虞市| 来凤县| 景洪市| 洛浦县| 武定县|