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
Hello, I am very new to hapi but I have used express. I would like to switch to hapi but wanted to know if there was a way to use express middleware inside a hapi app. Any blog posts or instructions on the best way to do this would be very much appreciated. I'd prefer a solution where I could wrap the express module so I wouldn't need to modify any of the module source.
The text was updated successfully, but these errors were encountered:
Is there a specific middleware module you wanted to use? It's very unlikely you'll be able to make this work without some level of transformation code.
You can't. But most of the use cases are covered using other modules. Just post what you are looking for on hapijs/discuss. I'm sure someone will help you out.
Great, thanks, I was looking into in using Apigee's Volos (https://github.com/apigee-127/volos) libraries which comes with express middleware and I wasn't sure if there was a way to call their middleware in some hapijs plugin wrapper. I've been in touch with them and they had said that HapiJS was something they are considering (see github issue: apigee-127/volos#62) ... I hope they do because I'd rather use HapiJs rather than Express.
While Apigee's API library might be somewhat of overlap with what Hapi offers natively, take a look at Kong. Putting Kong in front of APIs created with Hapi seems like an excellent idea. Kong is based on NGiNX Openresty, and you'd likely want to have NGiNX in front of your Node (Hapi) app in production anyway.
Hello, I am very new to hapi but I have used express. I would like to switch to hapi but wanted to know if there was a way to use express middleware inside a hapi app. Any blog posts or instructions on the best way to do this would be very much appreciated. I'd prefer a solution where I could wrap the express module so I wouldn't need to modify any of the module source.
The text was updated successfully, but these errors were encountered: