Skip to content

mk-Guvi/Mongo-Node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mongo-Node

Created with CodeSandbox 1.)create config-folder and create db.js file init

2.)add mongoose dependency and reate db connection in db.js and import it in index.js file

3.)create models folder and create the author.js file init.

4.)create the author schema in author.js file.

5.) create queries folder and create authorQueries.js file init.

6.)In authorQueries.js,create save,findall,findbyId,fineone,findandupdate,findbyfirstname,findonebyfirstname queries and run in terminal using "node src/queries/authorQueries.js" command.Note:import the db connection file and the author schema file.

7.)create book.js file under models and create the schema for books.

8.)create BookQueries.js file in queries folder and create the queries for books.Note:import db config,author models file(as we use it for reference) and book models.

About

Created with CodeSandbox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published