Join Gary Simon for an in-depth discussion in this video Setting up the API, part of Angular 2+: Creating CRUD Apps.
- [Instructor] Now it's time to set up our API…and connect to our Monco DB…through a package called Mongoose.…So first let's create a few folders.…So in Aru we're going to create a server folder…and inside of there we'll create an additional folder…and this one will be named routes.…And then also a file inside of routes…and this will be api.js.…
So to get started, we're going to declare a view variables…so const express and then also we'll include a router.…And then also we're going to import mongoose.…And mongoose is a no JS package to connect to our mongo DB…and it also provides us with object modeling.…But we haven't yet used npm to install it…so let's do that now.…We'll run npm install mongoose…and we'll save it as a dependency.…
So now if you recall we saved a mongo db connection…from mlab.com so you may want to get that out…because now we're going to create a new variable called DB.…So const db equals,…and this is where we paste in those credentials.…So right here it will tell you to place it…with your specified user name and also password here.…
- Angular Firebase CRUD
- Firebase setup
- Starting a project
- Defining the template
- CRUD apps with MongoDB
- MongoDB setup
- Creating a data service
- Home component
- Creating, updating, and deleting articles
Skill Level Intermediate
Angular 2: Widget-Based Architectureswith Derek Peruo52m 18s Intermediate
Angular 2 Essential Trainingwith Justin Schwartzenberger2h 45m Intermediate
1. Required Understanding
2. Angular Firebase CRUD
3. CRUD Apps with MongoDB (Back End)
4. CRUD Apps with MongoDB (Front End)
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.