Answer the question
In order to leave comments, you need to log in
Is there a bridge library between Node.js and Javascript in the browser?
There is a library that organizes a permanent, code-directed connection.
What I want to do:
I need to get the data of the directory, then get, depending on the data, the data of several sub-directories.
In the http request model, this will be 2+ requests and rendering delays.
In the local application model, there will be direct access to data (essentially a server).
With modern technology and sockets, it would be possible to reduce these gaps by making everything transparent.
What options are there to make the exchange of data between the database and the browser the most "direct"?
Answer the question
In order to leave comments, you need to log in
The most direct data exchange will be in Meteor
. And for normal nodejs, any library for rest api will do. I use koa
Alternatively, use graphql. You from the front will have a complete scheme of models on the server. Further it is possible to make by the coordinated naming to make api on the client. For example, there is a User model and it has a standard set of methods (CRUD) and call all query and mutation with the appropriate names.
User_create
User_find
User_update
User_remove.
From the front, create a type parser into an object and get a type model
...,
User:{
create(create_args){},
find(find_args){},
update(update_args){},
delete(delete_args){},
},
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question