{"action":"closed","issue":{"url":"https://api.github.com/repos/chapinkapa/Bold/issues/8","labels_url":"https://api.github.com/repos/chapinkapa/Bold/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/chapinkapa/Bold/issues/8/comments","events_url":"https://api.github.com/repos/chapinkapa/Bold/issues/8/events","html_url":"https://github.com/chapinkapa/Bold/issues/8","id":97274531,"number":8,"title":"schema modules should export schemas","user":{"login":"kjprice","id":2319673,"avatar_url":"https://avatars.githubusercontent.com/u/2319673?v=3","gravatar_id":"","url":"https://api.github.com/users/kjprice","html_url":"https://github.com/kjprice","followers_url":"https://api.github.com/users/kjprice/followers","following_url":"https://api.github.com/users/kjprice/following{/other_user}","gists_url":"https://api.github.com/users/kjprice/gists{/gist_id}","starred_url":"https://api.github.com/users/kjprice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjprice/subscriptions","organizations_url":"https://api.github.com/users/kjprice/orgs","repos_url":"https://api.github.com/users/kjprice/repos","events_url":"https://api.github.com/users/kjprice/events{/privacy}","received_events_url":"https://api.github.com/users/kjprice/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-26T01:51:46Z","updated_at":"2015-08-11T02:52:57Z","closed_at":"2015-08-11T02:52:57Z","body":"One thing that I came across is that it appears the we have [Bold.schemas](https://github.com/chapinkapa/Bold/blob/master/lib/bold.js#L247) actually expecting to hold instances of [mongo models](https://github.com/chapinkapa/Bold/blob/master/example/config/schema/user-store.js#L10).\r\n\r\nIt might make sense to create another directory *config/model* that will simply create models from the given schemas.\r\n\r\n### config/model/user.js example\r\n\r\n```\r\nvar Connection = require('bold').Connection;\r\nvar userSchema = require('../schema/user');\r\n\r\nmodule.exports = Connection.model('User', userSchema);\r\n```\r\n\r\n### config/schema/user.js example\r\n\r\n```\r\nvar mongoose = require('mongoose');\r\n\r\nvar User = new Schema({});\r\n\r\nmodule.exports = User;\r\n```\r\n\r\nThis becomes more important later when we need to access the UserSchema."}}