mongoose-one-to-many-relationship-example-feature-image

MongoDB One-to-Many Relationship tutorial with Mongoose examples

In this tutorial, I will show you one of the most important Relationship in MongoDB that you will use in most database structures: One-to-Many Relationship. You will also know 3 criteria to choose Referencing or Embedding for improve application performance. Then we’re gonna make some MongoDB One-to-Many Relationship examples using Mongoose library.

Related Posts:
Many-to-Many Relationship with Mongoose examples
One-to-One relationship tutorial with Mongoose example

Node.js, Express & MongoDb: Build a CRUD Rest Api example
Node.js + MongoDB: User Authentication & Authorization with JWT

Read More

node-express-mongodb-crud-rest-api-feature-image

Node.js, Express & MongoDb: Build a CRUD Rest Api example

Express is one of the most popular web frameworks for Node.js that supports routing, middleware, view system… Mongoose is a promise-based Node.js ODM for MongoDB that provides a straight-forward, schema-based solution to model our application data along with built-in type casting, validation, query building, business logic hooks… In this tutorial, I will show you step by step to build Node.js Restful API for CRUD operations using Express, Mongoose with MongoDB database.

You should install MongoDB in your machine first. The installation instructions can be found at Official MongoDB installation manual.

Fullstack:
– MEVN: Vue.js + Node.js + Express + MongoDB example
– MEAN: Angular + Node.js + Express + MongoDB example
– MERN: React + Node.js + Express + MongoDB example

Security: Node.js + MongoDB: User Authentication & Authorization with JWT

Read More

React + Node.js Express: User Authentication with JWT example

In this tutorial, we will learn how to build a full stack React.js + Express Authentication & Authorization example. The back-end server uses Node.js Express with jsonwebtoken for JWT authentication and Sequelize for interacting with MySQL database. The front-end will be created with React, React Router, Axios. We’ll also use Bootstrap and perform Form validation.

Related Posts:
React + Node.js + Express + MySQL example: Build a CRUD App
Node.js + MongoDB: User Authentication & Authorization with JWT

Read More

Node.js + MongoDB: User Authentication & Authorization with JWT

In this tutorial, we’re gonna build a Node.js & MongoDB example that supports User Authentication (Registation, Login) & Authorization with JSONWebToken (JWT). You’ll know:

  • Appropriate Flow for User Signup & User Login with JWT Authentication
  • Node.js Express Architecture with CORS, Authenticaton & Authorization middlewares, Mongoose ODM
  • Way to configure Express routes to work with JWT
  • How to define Mongoose Models for Authentication and Authorization
  • How to use Mongoose to interact with MongoDB Database

Related Posts:
Node.js, Express & MongoDb: Build a CRUD Rest Api example
MongoDB One-to-Many Relationship tutorial with Mongoose examples

Read More

Node.js Express + Angular 8: JWT Authentication & Authorization example

In this tutorial, we will learn how to build a full stack Node.js Express + Angular 8 Authentication example. The back-end server uses Node.js Express with jsonwebtoken for JWT authentication and Sequelize for interacting with MySQL database & Authorization. The front-end will be created with Angular 8 with HttpInterceptor and Router. We’ll also perform Form validation on UI.

Related Post: Node.js + MongoDB: User Authentication & Authorization with JWT

Read More

mongoose-one-to-one-relationship-example-nodejs-mongodb-feature-image

MongoDB One-to-One relationship tutorial with Mongoose example

Relationship in NoSQL database is not the same as traditional SQL database. That’s why you need to implement basic types of associations (such as One-to-One, One-to-Many, Many-to-Many) yourself. In this tutorial, I will show you 2 ways to make One-to-One Relationships, then we will implement Mongoose One-to-One relationship example in a Nodejs & MongoDB project.

Related Posts:
MongoDB One-to-Many Relationship tutorial with Mongoose examples
MongoDB Many-to-Many Relationship with Mongoose examples

Node.js, Express & MongoDb: Build a CRUD Rest Api example
Node.js + MongoDB: User Authentication & Authorization with JWT

Read More