How do I fix connect.router?

科技动态 2018-06-18 阅读原文

I'm working my way through Node for Front End devs
, and as people on SO have already pointed out
, Connect no longer has a module for routing. Some people have advised using Express, but I'm unsure of the exact syntax.

The example I am working through is hosted here:

github.com/garann/node-for-frontend-devs/blob/master/03-03.js

I would in turn like to finish the tutorial on templating:

js: github.com/garann/node-for-frontend-devs/blob/master/04-02.js

html: github.com/garann/node-for-frontend-devs/blob/master/public/parent.html

and was wondering whether people think it might be better to ditch these Connect based tutes and just learn how to use Express? As routing will most likely require Express anyway..

Thanks to SO excellent spam protection, I've had to remove the https:// portion of the github links.

Thanks for any help.

Node.js Recipes

责编内容by:Node.js Recipes阅读原文】。感谢您的支持!

您可能感兴趣的

Wi-Fi逐渐难破解 如何确保新路由器安全... 随着WiFi技术的发展,其实WiFi变得越来越难破解,原因是新一代的路由器,都采用了WPA3(最新网络设备安全)标准。 数据调查显示,在使用相同的安全标准十多年后,去年全球有超过50万个消费级路由器被黑客利用,从事恶意软件破坏。国际上的W...
IT老司机首秀MWCS2017 新华三为运营商而来... 【通信产业网讯】(记者 逄丹)以云计算、大数据、SDN/NFV为代表的新技术革命浪潮正在打破通信业既有的秩序和规则,行业边界被打破、网络基础被重构、商业模式被变革、业务应用被颠覆。全球范围内的主流运营商已经开始网络重构和数字化转型的征程。 ...
Easy Disaster Recovery Plan DR plans encompass everything from no plan whatsoever (failing to plan is planning to fail), to active/active workloads ...
利用虚假浏览器更新来入侵MikroTik路由器的活动分析... MikroTik是拉脱维亚一家从事路由器和无线ISP系统开发的企业,在过去几个月中处理了许多影响其产品操作系统的漏洞。2018年4月,研究人员发现RouterOS的一个关键漏洞,然后攻击就开始了,而新发现的 CVE-2018-14847 ...
Generating Netflow Records Netflow is a network protocol invented by Cisco that provides granular visibility on network utilization. Routers...