V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
plantain
V2EX  ›  问与答

koa 的路由是要自己用正则来匹配吗?

  •  
  •   plantain · 2015-09-04 14:08:43 +08:00 · 1667 次点击
    这是一个创建于 3192 天前的主题,其中的信息可能已经有所发展或是发生改变。

    这样?

    if ( this.url == '/'){
    //todo
    } else if (this.url == 'todo'){
    //todo
    }

    xream
        1
    xream  
       2015-09-04 14:14:24 +08:00   ❤️ 1
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3360 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 10:28 · PVG 18:28 · LAX 03:28 · JFK 06:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.