Bazinga777
Bazinga777

Reputation: 5281

Saving a backbone collection to MongoDB in express

I have looked around for tutorials on saving a collection to the backend but so far I have found none, what is the proper way of sending the collection to the server.

Looking at the documentation, it doesn't have a save method.

Upvotes: 0

Views: 34

Answers (1)

Raj
Raj

Reputation: 22956

Use the sync method in Collections.

synccollection.sync(method, collection, [options])

Uses Backbone.sync to persist the state of a collection to the server. Can be overridden for custom behavior.

Upvotes: 1

Related Questions