D
D
Dimka52015-11-10 14:54:31
MongoDB
Dimka5, 2015-11-10 14:54:31

How to link data between client JS, NodeJS server and MongoDB?

The user has data in the browser that is stored in the JavaScript model (JS object) It is
necessary to transfer the model without reloading the page (single-page application) to the server on NodeJS, so that he would create / save / update / delete it in MongoDB
I would not want to make a bicycle.
It is clear that on the client JS I have to write CRUD functions to contact the server, which give data to NodeJS. There I write the same functions that receive data and access MongoDB in these functions, I also specify methods that work directly with MongoDB. Roughly speaking, I wrote the same thing 3 times.
Right now, for example, I would do it with jQuery (client), http (or say express) module for NodeJS (server) and MongoDB module (DB). But I don't think this is the most elegant solution. Meteor please do not offer.
How to organize a bunch here?
client <=> server <=> database
What solutions are available for this task? Maybe something with backbone or angular for example, if you can be more specific? What I connect on the client that on the server? Maybe there are some proven bundles of modules? I'm already tired of writing such things for each application or dragging my own libraries for this implementation, is there a way to do this in a more correct and organized way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
amatory10, 2015-11-10
@Dimka5

I think it's better to use mean

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question