Skip to content

Create fake request, reply hapi interface for trailpack #42

Open
@jaumard

Description

@jaumard

In order to have only one interface for embedded controllers and policies, I create trailpack-controller and trailpack-policies that must use hapi interface for request/reply. In order to these component to work with trailpack-express we need to wrap methods of those component and transform express req/res into dummy hapi request/reply. Like this trailpack that use those class can be compatible with hapi and express very easily.

I didn't know how to do this because hapi allow some things like reply().header('key', 'value').redirect('newURL') and I don't know how make something like this with express API.

Any idea ? Any help appreciate ^^

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions