You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ^^
The text was updated successfully, but these errors were encountered:
In order to have only one interface for embedded controllers and policies, I create
trailpack-controller
andtrailpack-policies
that must use hapi interface for request/reply. In order to these component to work withtrailpack-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 ^^
The text was updated successfully, but these errors were encountered: