How to perform CRUD operations using angularjs, nodejs and mysql?

I am trying to understand how to perform crud operations using AngularJs, NodeJs

add Mysql. I need to understand the approach for this. Please explain with some

basic example.


CRUD is the acronym for the set of operations Create, Read, Update and Delete.

CRUD is the basic set of operations required to use and manipulate a collection, or resource if you will.

In this setting, "performing" CRUD operations would relate to your application in the following way:

  1. Angularjs uses $http to run http requests asynchronously against your RESTful API
  2. Nodejs implemest the routes that makes up the API, hopefully in accordance to the best practices widely used in existing APIs (An in-depth blog can be found here. Based on the route/api-method triggered, the nodejs will also send queries to MySQL to persist the changes nessesary.
  3. MySQL's job is to persist the data you are working with. Using SQL queries to (C)reate, (R)ead, (U)pdate and (D)elete data (CRUD operations). MySQL ofcourse has a lot of other tools as well, but in reference to the CRUD operations, these are what you need.

Now this is just the practical idea of how to implement a RESTful API with CRUD operations, persisting it with MySQL and consuming it with Angular. If you really are serious about learning more about this, you should:

  1. Google better (Really, it's too easy to find info about the subject as people have mentioned). The terms REST, RESTful, API, CRUD are all good keywords to google, then append whatever keywords you are more interested in "Best practice REST API" for example.
  2. Read blogposts, follow engineers on social media/blogs, read books, watch youtube etc. This information is everywhere.

One important thing that might not be obvious when starting out: Always try to find and standards or best practices for what you want to do. That means someone already has done the hard work of trying and failing, and basically serves you the best solution on a silver platter.

Need Your Help

Place boolean function in if statement expression

vb6 preferences

I'm maintaining a VB6 app. For boolean functions, the original authors store the return value in a boolean variable before checking the result in an If Statement. I prefer to place the function