mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-19 19:17:13 -05:00
Updated Add a collection (markdown)
parent
ac347c910f
commit
277357c643
1 changed files with 6 additions and 4 deletions
|
@ -10,10 +10,12 @@ Define the model's schema, construct REST endpoints on the server, and create a
|
|||
|
||||
Here are the key things you need to add a collection to the website:
|
||||
|
||||
1. JSON schema file in `/app/schemas/models`. This defines what properties of documents in the collection, and is used by both server and client.
|
||||
1. Mongoose Model in `/server/models`. This is the server's active record interface with MongoDB for the collection.
|
||||
1. Node/Express REST endpoints in `/server/routes/index.coffee`. Typically need POST, PUT, GET one and GET many, although each collection's may need more or less.
|
||||
1. Backbone Model and Collection in `/app/models` and `/app/collections`, respectively. These are the client's active record interface for a document or set of documents in the collection.
|
||||
1. [[JSON schema file in `/app/schemas/models`|add-a-collection-schema]]. This defines what properties of documents in the collection, and is used by both server and client.
|
||||
1. [[Mongoose Model in `/server/models`|add-a-mongoose-model]]. This is the server's active record interface with MongoDB for the collection.
|
||||
1. [[Node/Express REST endpoints in `/server/routes/index.coffee`|add-basic-rest-endpoints-for-a-collection]]. Typically need POST, PUT, GET one and GET many, although each collection's may need more or less.
|
||||
1. [[Backbone Model and Collection in `/app/models` and `/app/collections`, respectively|connect-backbone-to-new-collection]]. These are the client's active record interface for a document or set of documents in the collection.
|
||||
|
||||
See linked recipes for details and examples.
|
||||
|
||||
## Resources
|
||||
|
||||
|
|
Loading…
Reference in a new issue