Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Barry Kaplan
    @memelet
    Can storage actually be used with mongoose?
    Konstantin Melnikov
    @archangel-irk
    Hi, no, currently storage is used only on the client side (in browser). And how exactly you want to use the storage?
    Currently on the server side is used mongoose, and uses client-side storage
    But the plans include adding the ability to use storage on the server side.
    We currently use storage together with https://github.com/archangel-irk/rest-api-client
    Konstantin Melnikov
    @archangel-irk
    And on the server side we use https://github.com/chetverikov/substance + mongoose
    Barry Kaplan
    @memelet
    I want to share the same schema with both client and server. I guess I can looking into passing in a Schema instance when defining schemas. Of course other options are to drop mongoose and go down a level.
    Konstantin Melnikov
    @archangel-irk
    At the moment we use a similar scheme on the client and the server. The only difference is that not all fields are required on the client for the security reason. Turns out, there are two identical files with the scheme, the first is located on the server, the second on client. The server acts as an api to which client-side queries to retrieve data, then these data are converted into a document using the schema on the client.
    Now there is no reason to use the storage on the server, because there is a mongoose. And schemes for they have almost the same syntax.
    There is currently no transport to transfer the schema from the server to the client, it is necessary to use two files.
    You don't have to abandon mongoose, if you want to use the schema on the client.
    I will gladly help you in solving your problem.