Skip to content

Usage in http server #2

@kesla

Description

@kesla

Hey, please let me know if I've misunderstood how this is supposed to be used.

To me it seem that the way you use this with a node http(s) server is to do something like this:

http.createServer(function (req, res) {
  var ctx = context();
  ctx.request.req = req;
  ctx.request.res = res;
  ctx.redirect('http://google.com');
});

Is this true or have I misunderstood this module slightly? Would you accept a PR making it possible to initialize this with context(req, res)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions