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

Danielle Hill
Danielle Hill
26,062 Points

Node.js Basics Practice Project

Hello fellow JavaScript students! I made a command line app using Node.js and the Marvel API to retrieve comic character data. Here's the link to the GitHub repo:

https://github.com/danie11edotcom/nodecomicapp

Please feel free to review and comment on suggested improvements and features. Thanks in advance!

2 Answers

It seems like the app will not work without the config file, which has been placed in your gitignore rules. So it's hard to checkout how the app works.

In the print.js file you've assigned message to attribution, but you never used it.

in comic.js you've accessed the characterData using bracket notation, usually dot notation is used unless the name of a property contains a space or you're using a variable as the key.

Also, you have some strange stuff going on with your indentation that's making it hard to read your code, I've sent you a pull request on github that should be a little cleaner.

Danielle Hill
Danielle Hill
26,062 Points

Great feedback, Hayley. My Marvel API keys are in the config file so I kept it hidden. I have updated the README doc to include a description of how the app works and sample screenshots.

I updated the print.js and comic.js files to use the attribution method.

I changed from bracket to dot notation where possible.

Thanks for the pull request. I've merged in your changes. I'll have to dig a little deeper on how/why this happened. My spacing in Sublime Text didn't look like it did on GitHub.

Thanks for taking the time to review the project and respond.