JavaScript 路由器 | Linux 中国(12)

  • }

  • console

    .

    log

    (

    router

    .

    exec

    (

    "/"

    ))

    // home page

  • console

    .

    log

    (

    router

    .

    exec

    (

    "/users/john"

    ))

    // john"s page