Learn Node Starter Files + Stepped Solutions
These are the starter files and stepped solutions to accompany the LearnNode.com course.
You'll start your application in the starter-files
directory β feel free to rename it.
If you need help, each folder number corresponds with where you should be at the start of a video. So if you are having trouble with video 24, look to folder 25 for the answer.
The stepped solutions are meant for you to apply on top of your existing code - they don't stand on their own.
Not all videos have a solution as their changes aren't significant enough.
Getting Help
Need some help? Want to chat with the other learners? The Slack Chat that accompanies this course is where you should be asking questions β this repo is meant as a place to grab the starter files and isn't a support channel.
Pull Requests
If you found a different / better way to solve problems in the application, great! These files are meant to be as close to 1:1 as they are shown in the videos so I generally won't accept any pull requests for changing how the application functions.
Glaring errors, clarifications and files that aren't shown in the videos are totally fair game for pull requests and are appreciated.
Enjoy!
FAQ
The Google Maps API key isn't working
The course might have hit a limit with the API key β if this is the case you need to sign up for your own API key over at https://developers.google.com/maps/documentation/javascript/usage. You will need to enable static maps for your API key. Here is a quick video on how to do this.
Once you have the API key, simply place it in your variables.env
file and restart.
/data/db
like code:100
and connection failed
I'm getting errors related to Check out this answer on stack overflow to get mongoDB running locally.
URIError: URI malformed
error when running npm start
I'm getting a Thanks to Chris Ellinger for this:
If youβre getting a
URIError: URI malformed
error when runningnpm start
, break out your environment variables. Go intovariables.env
and split the URI like thisMONGO_URI=mongodb://host.com:port
DB_USER=username
andDB_PASS=password
. Then inside yourstart.js
replacemongoose.connect(process.env.DATABASE)
withmongoose.connect(process.env.MONGO_URI, {user: process.env.DB_USER, pass: process.env.DB_PASS});
. I had issues connecting to my mongodb because my password contained symbols.