Mongodb & expressJS



Mongodb

Mongodb is a nosql database unlike a rdms where the columns are fixed we can have n number of columns as we like.This versatility of nosql database gives it an edge over the latter.Business entities who maintain rdbms like sql server, oracle experience huge headache. If it three tier architectural styled programming then problem just increses ten folds.

Many uses orm(object relational mapping) for mongodb there is mongoose but in my view we should not maintain models at all.There is a additional problem of maintaining models.Things should be dynamic.
In the form itself we make changes then we need not think of the rest.This decreases the surface area of problems occurring in our application
Please view the white paper form mongodb site itself.
Its really the best for your business.


  

 Select msi then hit download



Add it to your PATH of environment variables. it Should be from:
C:\Program Files\MongoDB\Server\4.0\bin

now Create a “\data\db” folder in C:/ which is used by mongodb to store all data. You should have this folder:

Type
mongod
In one terminal then
mongo
In another






Hit gulp serve


In postman
Post-->http://localhost:3000/api/Form/UserAdd
Body-->raw:{"name":"sajal","roll":"ggg"}


Robo3T

We can see the data got inserted into mongodb

Comments