A simple CRUD app with Express and MongoDB that adds, deletes, update quotes.
Tech used: JavaScript, Node, Express, MongoDB.
Instead of creating a server with Node's native method, here I used Express. Express is a node framework for building web application. It simplifies the process of creating a server.
MongoDB is a databse. All the quotes data stored in one place.
CRUD is an acronym for Create, Read, Update and Delete. It is a set of operations we tell servers to execute (POST, GET, PUT and DELETE requests respectively).
This is what each operation does:
Create (POST) - Make something
Read (GET)- Get something
Update (PUT) - Change something
Delete (DELETE)- Remove something
I didn't use any front-end JavaScript library to generate the views. Instead, plain old EJS was used here. I simply just made a
- inside.
React for the front-end to render views.
Asyc-await to handle promise
Better error handling
Serach feature
switch to Mongoose
bodyparser is deprecated
Difference between MongoDB and Mongooseb:
mongodb is a native driver in Node.js to interact with MongoDB
Mongoose is an object modeling tool build ontop of mongodb driver that allows programmers to model their data. (schema )