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

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

主站蜘蛛池模板: 广饶县| 呼图壁县| 陇南市| 株洲县| 九龙城区| 吉林省| 东阿县| 南溪县| 富蕴县| 额济纳旗| 友谊县| 杭锦旗| 四平市| 新建县| 增城市| 修文县| 芦山县| 泸水县| 张掖市| 澜沧| 永登县| 罗平县| 瑞金市| 新竹县| 喜德县| 临湘市| 成武县| 清河县| 淮阳县| 镇江市| 香格里拉县| 榆林市| 乐陵市| 彝良县| 朝阳县| 剑阁县| 宁武县| 平度市| 兴文县| 工布江达县| 杭州市|