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
Expose Middleware #3
Conversation
init package.json
Conflicts: .gitignore README.md package.json
"name": "Gordon Hall", | ||
"email": "gordon@bitpay.com" | ||
} | ||
], | ||
"scripts": { | ||
"make-dist": "sh scripts/make-dist.sh", | ||
"test": "node_modules/.bin/mocha test/* --reporter spec", | ||
"test": "mocha test/* --reporter spec", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we assuming that devs will have mocha installed globally? it's set as a devDependency in the package.json, so it should be available locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question; I wasn't able to get it running out of the .bin folder, but I knew I had it available globally. Seems like an environment-specific mechanism (unless I'm misunderstanding?), so is there a way to detect where mocha is available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure, always seems to be available to me at that path, but could be specific to my NPM version. assuming global might be just fine - users can install mocha globally, or likely already have it.
fix verify + change to phantomjs browser
This exposes the Express middleware on the module.
Use:
app.use( bitauth.middleware );