Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README should be updated that this lib requires node Express #23

Closed
krunkosaurus opened this issue Oct 17, 2014 · 4 comments
Closed

README should be updated that this lib requires node Express #23

krunkosaurus opened this issue Oct 17, 2014 · 4 comments

Comments

@krunkosaurus
Copy link

The README should be updated that this lib requires node Express. The lib requires a http req object that is unique to Express. I tried using Hapi and Connect alone but neither worked with this library.

@omsmith
Copy link
Owner

omsmith commented Oct 22, 2014

Sorry for the delay.

I'll have a look tomorrow evening to see what exactly is being referenced that is specific to express and get rid of it. Really shouldn't be.

If nothing else, will at least try to adapt to other frameworks as well.

@krunkosaurus
Copy link
Author

Thanks @omsmith. It's anywhere in your methods that takes in a req object. This req object is formatted for Express. For example it references req.body for HTTP POST variables where Hapi uses req.query. You could change your methods to take an obj hash of POST variables instead of accepting a req object directly. In any case, I just started using Express for the example I was using and its working fine now. Just thought you should know, in case you wanted to make the framework web server independent.

@Tape Tape closed this as completed in fb9b5ce Oct 22, 2014
@Tape Tape reopened this Oct 22, 2014
@Tape
Copy link
Collaborator

Tape commented Oct 22, 2014

I should probably double check my commit numbers ;)

@omsmith
Copy link
Owner

omsmith commented Oct 22, 2014

Ha

On Wed, Oct 22, 2014 at 4:27 PM, David Kosub notifications@github.com
wrote:

I should probably double check my commit numbers ;)


Reply to this email directly or view it on GitHub
#23 (comment).

Owen

omsmith added a commit that referenced this issue Oct 24, 2014
accept body as second parameter to valid_request and parse_request
avoid express-specific features such as req#get and req.protocol
add hapi-specific check to get url and protocol
@omsmith omsmith closed this as completed in 2cb4293 Dec 8, 2014
omsmith added a commit that referenced this issue Dec 8, 2014
fix(not-express) avoid being locked into express. closes #23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants