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

Updates for compatibility with Hapi 8.0 (WIP) #99

Merged
merged 9 commits into from
Dec 18, 2014

Conversation

paulgrock
Copy link
Contributor

Exercises updated:

  • Hello_hapi
  • Routes
  • Handling
  • Directories
  • Views
  • Proxies
  • Helping
  • Streams
  • Validation
  • Validation using joi object
  • Uploads
  • Cookies

I'll finish the others tomorrow or this weekend.
Fixes #100

@martinheidegger
Copy link

Very nice! Is it just me or does it look like the verify method doesn't wait a proper amount for the hapi server to startup? Often getting this error when verifying:

✗ Error connecting to http://localhost:33907: ECONNREFUSED

Error: connect ECONNREFUSED
    at errnoException (net.js:904:11)
    at Object.afterConnect [as oncomplete] (net.js:895:19)

@paulgrock
Copy link
Contributor Author

It looks like the ECONNREFUSED error existed prior to upgrading to Hapi 8. #98 was opened a few days ago. I tried running the unmodified workshop with Hapi 7 and occasionally got the error as well. I'll dig around and see if I can find a fix

@martinheidegger
Copy link

Just found a problem with cookies (the section, not the real ones). Seems like the validation just passes the cookie 'session=eyJrZXkiOiJtYWtlbWVoYXBpIn0=; Max-Age=0; Expires=Sat, 13 Dec 2014 19:27:21 GMT; Domain=localhost; Path=/{path*}' as it was received: https://github.com/hapijs/makemehapi/blob/7da6437aadba0dfe2636dbb881302de0621c5a31/exercises/cookies/exercise.js#L86 This is the same thing as telling the server that there is a Max-Age, Expires, etc. value in the data set. That wasn't a problem but some time in the last months the default settings for cookies where that the value has to be strict and the value for the "Expires" field doesn't match that setting.

@paulgrock
Copy link
Contributor Author

This is no longer WIP in progress. All the exercises should with Hapi 8 now.

@lloydbenson
Copy link
Contributor

hey @linclark any chance you could review this so folks can start learning hapi 8?

@linclark linclark removed their assignment Dec 16, 2014
@linclark
Copy link
Contributor

you can feel free to commit

@@ -1,7 +1,10 @@
var Hapi = require('hapi');
var server = new Hapi.Server();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

server should be after your module definitions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing

@lloydbenson
Copy link
Contributor

Overall looks pretty good, just a few stylist things to follow hapi standards.

@lloydbenson lloydbenson self-assigned this Dec 17, 2014
lloydbenson added a commit that referenced this pull request Dec 18, 2014
Updates for compatibility with Hapi 8.0 (WIP)
@lloydbenson lloydbenson merged commit de35982 into ccarruitero:master Dec 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hapi requires stream2 streams, rot13-stream is a stream stream
4 participants