Write Breezejs data source provider with Nodejs for MySQL

Problem

I would like to use Breeze with NodeJS and MySQL. Unfortunately, so far I could find no examples of this. I have seen that there is an example of NodeJS + MongoDB. Now I try to analyze the MongoDB provider (mongoSaveHandler.js - [npm install breeze-mongodb]?) to write my own provider for MySQL. Unfortunately I could not find any documentation on how such a provider must be established.

The provider should be able to deal with complex data and navigation properties (one-to-many, etc.) and also save/delete/update them properly in the MySQL database.

The following is an example of how the database structure might look like:

Database Image

My questions are now:

  • Is there already an example with Breeze (+NodeJS) and MySQL that I could use?
  • Is there a documentation/sample how to write a own data source provider?
  • If I'm on my own, what should I look for when I create my provider?
Problem courtesy of: Toast Man

Solution

There are plenty of Web API+EF+SQL samples, the Node+MongoDB sample you've already seen, a Ruby+SQL sample, and even a NoDB (and 3rd party data) sample ... but no Node+SQL sample yet.

These docs aren't spot on for your use case, but they will likely point you in the right direction:

ToDo Server

The docs are for Web API+EF+SQL, but good detail on how everything is wired together.

MongoDB

The MongoDB docs as well as the Zza! sample are pretty good about showing how they configured the Node server (to talk with MongoDB, sure, but you can see the process all the same).

Solution courtesy of: John

Discussion

There is currently no discussion for this recipe.

This recipe can be found in it's original form on Stack Over Flow.