server.coffee
changeset 2 26148011541f
parent 1 411d80fcd66c
child 3 0fa2f12fcb3c
equal deleted inserted replaced
1:411d80fcd66c 2:26148011541f
    18         path: rq.path
    18         path: rq.path
    19         pathInfo: rq.pathInfo
    19         pathInfo: rq.pathInfo
    20       response: rs
    20       response: rs
    21   }
    21   }
    22   'post': Apps.Method {
    22   'post': Apps.Method {
    23     'POST': new Apps.Chain().use(Apps.JsonRequest).use(() => (o, rq, rs) => {
    23     'POST': Apps.JsonRequest((o, rq, rs) => {
    24       status: 200
    24       status: 200
    25       headers: {}
    25       headers: {}
    26       data:
    26       data:
    27         post: o
    27         data: o
    28         request:
    28         request:
    29           path: rq.path
    29           path: rq.path
    30           pathInfo: rq.pathInfo
    30           pathInfo: rq.pathInfo
    31         response: rs
    31         response: rs
    32     }).end()
    32     })
    33   }, Apps.methodNotAllowed
    33   }, Apps.methodNotAllowed
    34 }
    34 }
    35 
    35 
    36 app = Apps.Chain().use(() => Apps.HandleJsonResponses(route, null, "  "))
    36 app = Apps.Chain().use(() => Apps.HandleJsonResponses(route, null, "  "))
    37   .end()
    37   .end()