Express Mongoose Bookmarks API
Demo of using Mongoose with Express to build a simple API of bookmarks.
Prerequisites
- Node
- MongoDB and Mongoose
- Express
Instructions
- Fork and clone this repository.
- Change into the new directory.
- Fulfill the listed requirements.
Instructions
Part 1: Basic Setup
Create a package.json
and build out the file system for our simple API.
Part 2: Database and Mongoose
Set up the database connection and define a model based on the provided bookmarks data.
Part 3: Express
Set up a simple Express app with a single endpoint.
Part 4: Express and Mongoose
Use your Mongoose model to query data from within your Express route. Return the results to the user as JSON.
License
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.