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阅读原文】。感谢您的支持!

您可能感兴趣的

2 Factor for Home Wi-Fi? Given that we use the Internet 24x7x365 nowadays, it occurred to me that very few of us actually take time to invest in our ubiquitous router's securi...
CIA真是无孔不入 2012年起它们就开始通过路由器搞监控了... Mashable中文站 6月18日报道 你的路由器长了眼睛吗?这问题好像挺傻,但答案却是肯定的,不过它长的可能是CIA(美国中央情报局)的眼睛。 维基解密透露,CIA可以重写一部分路由器软件,这样路由器就能帮它们最终用户的网络活动。同时,CIA的入侵工具还有个颇为浪漫的名字——樱花。 ...
Understanding Mesh Networking: The Future of Wirel... Cloud computing has become a major topic of discussion and has opened up the world of the IoT. However, a new terminology is making its way into ta...
CoinHive挖矿劫持仍在肆虐 至少28万路由器被检出感染... 最近几年,区块链领域闹出了许多幺蛾子。比如为了攫取不当的加密货币挖矿收益,某些人制作了能够窃取设备算力的恶意软件,有几个挖矿网络的受害者规模甚至相当庞大。就在过去几天,研究人员发现了另外 3700 台秘密运行恶意的加密货币挖矿软件的路由器。 截止目前,此类受感染设备的总数已经...
4万亿餐饮大蛋糕,如何实现曾鸣提出的“协同效应”?... “协同效应”是阿里巴巴合伙人、湖畔大学教育长曾鸣近期提出的概念,它囊括过去二十年的“网络效应”,但更高维度的区别在于: ①信息的分享由串联走向并联;②从相对封闭的体系走向相对开放的体系;③从传统的管理模式,走向社会化协同的管理模式。 他提到,平台的价值在于在一个生态中提供了非常重要...