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

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

主站蜘蛛池模板: 手机| 泾川县| 铜川市| 绥滨县| 屯昌县| 鲁山县| 曲阜市| 鹿邑县| 邹城市| 大城县| 阿合奇县| 永嘉县| 黑龙江省| 平武县| 阳山县| 堆龙德庆县| 漳州市| 临泽县| 阳朔县| 抚顺市| 崇明县| 万州区| 海盐县| 微山县| 昌都县| 乾安县| 山东| 灵丘县| 大同县| 梁山县| 甘德县| 轮台县| 米脂县| 施甸县| 石狮市| 河北省| 荔浦县| 汨罗市| 漳浦县| 刚察县| 镇远县|