Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Build a Simple Dynamic Site with Node.js HTTP Methods and Headers Dealing with the POST Body

ERR_HTTP2_PROTOCOL_ERROR

I get this error after loading the workspace, entering a valid username, and then clicking search. I'm pretty sure this happens because the server we create is HTTP, but we're requesting content that's HTTPS. I tried updating my app file to use HTTPS, but after doing so the workspace doesn't load.

Here's a snapshot of my code:

https://w.trhou.se/c0h3xrsukf

1 Answer

Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Treehouse Project Reviewer

Hey there Mike Floyd ! :wave:

On line 21 of router.js you're missing the parenthesis to close off the end method. It seems to work fine for me after adding that :thumbsup:

response.end();

Ah, rookie mistake! Thank you, that fixed it.

Travis Alstrand
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Travis Alstrand
Treehouse Project Reviewer

Oh good! I'm glad it was just that small issue. And don't be discouraged, it happens allll the tiiiime, and to all of us! :smile: