-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotes.txt
18 lines (9 loc) · 1 KB
/
Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
=> First Made Index.js File. (This will be an Express Server.)
=> Then Made dataBase.js file which is Help to connect with MongoDB using mongoose.
-> https://www.mongodb.com/developer/languages/javascript/mongoose-versus-nodejs-driver/ (mongoose)
-> Mongoose is a Node.js-based Object Data Modeling (ODM) library for MongoDB. It is akin to an Object Relational Mapper (ORM) such as SQLAlchemy for traditional SQL databases. The problem that Mongoose aims to solve is allowing developers to enforce a specific schema at the application layer. In addition to enforcing a schema, Mongoose also offers a variety of hooks, model validation, and other features aimed at making it easier to work with MongoDB.
=> Made Modal (Schema) of Notes and Users in models folder.
=> First made routes for authorization in auth.js
=> For whenever login require made middalware "fetchUser.js".
-> get the userId by jwt token and put it to reqest body (object).
=> made routes for Notes CRUD operation in notes.js