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
Hapi v17/18 update #1251
Hapi v17/18 update #1251
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1251 +/- ##
=========================================
Coverage ? 98.34%
=========================================
Files ? 112
Lines ? 1933
Branches ? 540
=========================================
Hits ? 1901
Misses ? 32
Partials ? 0
Continue to review full report at Codecov.
|
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.
Tested on my machine, everything looks good 🎉
Thanks @Danwhy
@@ -1,7 +1,7 @@ | |||
language: node_js | |||
|
|||
node_js: | |||
- '7.10.1' | |||
- '8.12.0' |
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.
Consider bumping this up to LTS https://nodejs.org (v10) ? 🤔
name: 'Authentication', | ||
register: async function (server, options) { | ||
server.state('token', { | ||
isSecure: false |
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.
consider making this an environment variable with a default to false
so that it can be configured in AWS without a code release. (it's OK for now)
const jwt = JWT.sign(session, config.JWT_SECRET); | ||
return reply.redirect('/').state('token', jwt, {ttl: 5 * 3600 * 1000}); | ||
console.log('GOOD'); |
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.
please consider removing these console.log('GOOD')
and console.log('BAD')
or making them more specific so the person reading the logs can stack-trace/debug them. 😉
const result = await elastic.search(searchOpts); | ||
return result.hits.hits; | ||
} catch (err) { | ||
throw err; |
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.
what error handler is "catching" this throw err
...?
"boom": "^6.0.0", | ||
"catbox": "^8.0.1", | ||
"catbox-redis": "^3.1.1", | ||
"axios": "^0.18.0", |
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 axios? https://www.npmjs.com/package/axios ? 💭
(used to fetch from ES/API ... but why? or why not something else?)
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.
@Danwhy tests and code updates look great! thanks! 🎉
ref #1111
Upgrades hapi to v18:
h
)