Programming MongoDB with Mongoose. The demos call same-origin /api/lab6 so they render without a local mongod. The sibling Express server implements the same routes with Mongoose when DATABASE_CONNECTION_STRING is set, and the Chapter 5 in-memory arrays otherwise.
MongoDB connection
Students set DATABASE_CONNECTION_STRINGon Express. This demo checks the server's database connection status.