This lesson will walk you through replacing the app's file system reliance with a live MongoDB database. We'll also use a popular ORM library to manage our database operations.
Did you populate your database using the command shown?
mongoimport --db test --collection users --drop --file user_list.json
The default behavior of
mongoose.model() is to use the plural form of the model name for the collection. So
mongoose.model('User', userSchema) will look for a
users (note the plural) collection.