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

Summary

Our app now looks and feels like a real application. We went from little knowledge of Express to actually using it to build a small yet fully functional site. At this point, we now know how to respond to different HTTP methods. We know how to wire up routes in a clean and extendable manner. Our app has 14 different pieces of middleware. This might seem like a lot, but our app is also doing a lot. We can use templates and partials to render our pages easily. Finally, we have a simple authentication system that uses sessions. We laid a very good base for our chat application, all in just over 40 lines, in our app.js.

In our next chapter, we will cover how to add real-time communication between the server and the browser using Socket.io.

主站蜘蛛池模板: 周宁县| 夏津县| 探索| 天峻县| 永吉县| 香港 | 马尔康县| 仙游县| 新安县| 农安县| 安泽县| 班玛县| 恩平市| 无棣县| 赞皇县| 永城市| 宜春市| 晋城| 水城县| 小金县| 丰镇市| 临安市| 惠安县| 曲沃县| 车险| 专栏| 德钦县| 文昌市| 南郑县| 东安县| 淄博市| 大石桥市| 伊宁市| 怀安县| 周至县| 怀柔区| 济南市| 深泽县| 泰来县| 赤峰市| 泰安市|