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

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

主站蜘蛛池模板: 德兴市| 商丘市| 巢湖市| 五华县| 若尔盖县| 西峡县| 美姑县| 修武县| 安吉县| 华亭县| 金平| 青川县| 嘉黎县| 安庆市| 山阴县| 黔西| 志丹县| 樟树市| 当雄县| 壶关县| 五常市| 丰顺县| 彰武县| 吴江市| 图木舒克市| 黑山县| 宁乡县| 德昌县| 元阳县| 武穴市| 锦州市| 通江县| 桂林市| 安吉县| 元阳县| 霍林郭勒市| 南皮县| 江口县| 柳河县| 象州县| 印江|