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 trialKosta Kuts
15,894 PointsProblem with setting up the project
Hey everyone, I'm currently working on this practice: https://teamtreehouse.com/library/introducing-the-practice-37
After downloading the project's files I run npm install It goes with warnings but Ok next step I run npm start and it doesn't work.
I discovered a fix with setting up a local server ( from another lesson ): python -m SimpleHTTPServer 8000
and it kinda worked out for me. But I feel silly because I don't really understand what's going on. So the questions are:
Why do I need to set up a local server if we are using CDN libraries?
Why NPM doesn't start?
Back when I was practicing PHP I used to use MAMP. But here we do not work with databases, so why do we need a server?
What course can you recommend to get the idea?
1 Answer
Austin Whipple
29,725 Pointskarzuan,
Why do I need to set up a local server if we are using CDN libraries?
I haven't taken that particular course, but it may be the case that the use of a server here is, in part, practice for when you'll want to set something like this up on your own which may require a full-blown local development environment.
Why NPM doesn't start?
Hard to say without a bit more information. We might be able to help if you're able to share the warnings that you encountered during the npm install process.
Back when I was practicing PHP I used to use MAMP. But here we do not work with databases, so why do we need a server?
You don't necessarily need a web server to run node.js alone, but it's helpful when used for applications delivered over the web because the servers come along with addition routing, SSL, and other features that will assist you. Again, might not be that you need all of those in this one case, but it's foundational knowledge for when you apply this elsewhere.
What course can you recommend to get the idea?
Could be worth giving this Node.js Basics course a shot.