Summary
Keywords
Full Transcript
Full-stack web development Tutorial in Just 3 Weeks Week 3: Day 2 Section 12: Intro to Node, Mongo, & REST APIs Tutorial 114: SWAG SHOP API: PROJECT CREATION In this video tutorial, we are going to learn to build our own database, install mongoose, and then make requests to it. You will learn about node version manager(NVM). What is Mongoose? It is an object data modeling library(ODM). It is a tool designed to work in an asynchronous environment. It manages relationships between data, provides schema validation, and is used to translate between objects in code and the representation of these objects in MongoDB. It enforces structure as well as maintaining the flexibility that makes MongoDB powerful. Mongoose schema defines the structure of the data and the mongoose model provides an interface to the database for creating, querying, updating, deleting, etc. How to install mongoose? First install Node.js and MongoDb. Then, npm install mongoose // using Node.js require() const mongoose=require('mongoose '); //using ES6 imports import mongoose from 'mongoose'; What is Node Version Manager? It is a tool that allows the user to switch between different versions of node.js. It helps you to test your application on multiple versions of npm to ensure they work for users on different versions. It is designed to be installed per user and invoked per shell. To install a particular version, use the command: nvm install and add the number of the version. nvm install [version]
