https://github.com/sanengineer/nodejs-mongoose-1on1
Create One on One Relationship MongoDB with NodeJS and Mongoose.
https://github.com/sanengineer/nodejs-mongoose-1on1
mongodb mongodb-database mongoose mongoose-js mongoose-schema nodejs nodejs-framework nodejs-mongodb oneonone relationships
Last synced: 4 months ago
JSON representation
Create One on One Relationship MongoDB with NodeJS and Mongoose.
- Host: GitHub
- URL: https://github.com/sanengineer/nodejs-mongoose-1on1
- Owner: sanengineer
- Created: 2020-10-13T04:24:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-16T12:35:40.000Z (over 4 years ago)
- Last Synced: 2025-01-10T18:35:23.964Z (5 months ago)
- Topics: mongodb, mongodb-database, mongoose, mongoose-js, mongoose-schema, nodejs, nodejs-framework, nodejs-mongodb, oneonone, relationships
- Language: JavaScript
- Homepage:
- Size: 1.45 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Create One To One Relationship MongoDB With NodeJS and Mongoose
# Data Base Input
Change value of key database on server.jsExample:
For Brand Table :
{
name: "Microsoft"
}For Device Table :
{
name: "Surface Book"
storage: "256GB"
color: "Grey"
code: 512GB // key code is automatically generated
brand: {name: "Microsoft"} // automatically by reference on Brand Table
}So you just change key `name` on **Brand** table, and change keys `name`, `storage`, `color` on **Device** table.
## Run Code
$ cd
$ npm run dev