{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/comments/52646671","id":52646671,"diff_hunk":"@@ -1 +1,239 @@\n-# node-modules-patterns\n\\ No newline at end of file\n+# Module Patterns in Node\n+\n+## Overview\n+\n+This lesson will cover the most common patterns used to create and export a Node module.\n+\n+## Objectives\n+\n+1. Define different patterns for Node modules\n+1. Describe module.exports= {}\n+1. Describe module.exports=function(){}\n+1. Describe exports.method = function(){}\n+1. Describe exports.object = {}\n+\n+## Exporting a Module\n+\n+Module allow developers to build better systems because the code can be separated into different files which are groups into packages or modules. You can write your own module or use a module from an open-source community (some one else created it and made the code available to others free of charge). \n+\n+Imagine a scenario where you have an application with 2,000 lines of code. All code is in one file. That's a nightmare because to navigate around in such a file and also different developers will have to be very careful when they collaborate not to introduce conflicts in their changes! What if you split the logic into 20 files which each file having 100 lines of code roughly. Much better right? So how do you write a module in Node.\n+","path":"README.md","position":null,"original_position":22,"commit_id":"d16f09808c60f3b2f0dfea0f7841b58c0838a461","original_commit_id":"f9600344bfee10a384445d425d38c0b952797cc3","user":{"login":"vicfriedman","id":3287611,"avatar_url":"https://avatars.githubusercontent.com/u/3287611?v=3","gravatar_id":"","url":"https://api.github.com/users/vicfriedman","html_url":"https://github.com/vicfriedman","followers_url":"https://api.github.com/users/vicfriedman/followers","following_url":"https://api.github.com/users/vicfriedman/following{/other_user}","gists_url":"https://api.github.com/users/vicfriedman/gists{/gist_id}","starred_url":"https://api.github.com/users/vicfriedman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicfriedman/subscriptions","organizations_url":"https://api.github.com/users/vicfriedman/orgs","repos_url":"https://api.github.com/users/vicfriedman/repos","events_url":"https://api.github.com/users/vicfriedman/events{/privacy}","received_events_url":"https://api.github.com/users/vicfriedman/received_events","type":"User","site_admin":false},"body":"Can we add another header here? split the intro from the explanation","created_at":"2016-02-11T18:43:31Z","updated_at":"2016-02-11T18:43:31Z","html_url":"https://github.com/learn-co-curriculum/node-modules-patterns/pull/1#discussion_r52646671","pull_request_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/comments/52646671"},"html":{"href":"https://github.com/learn-co-curriculum/node-modules-patterns/pull/1#discussion_r52646671"},"pull_request":{"href":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/1","id":57535993,"html_url":"https://github.com/learn-co-curriculum/node-modules-patterns/pull/1","diff_url":"https://github.com/learn-co-curriculum/node-modules-patterns/pull/1.diff","patch_url":"https://github.com/learn-co-curriculum/node-modules-patterns/pull/1.patch","issue_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues/1","number":1,"state":"open","locked":false,"title":"Wip master","user":{"login":"azat-co","id":1137314,"avatar_url":"https://avatars.githubusercontent.com/u/1137314?v=3","gravatar_id":"","url":"https://api.github.com/users/azat-co","html_url":"https://github.com/azat-co","followers_url":"https://api.github.com/users/azat-co/followers","following_url":"https://api.github.com/users/azat-co/following{/other_user}","gists_url":"https://api.github.com/users/azat-co/gists{/gist_id}","starred_url":"https://api.github.com/users/azat-co/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azat-co/subscriptions","organizations_url":"https://api.github.com/users/azat-co/orgs","repos_url":"https://api.github.com/users/azat-co/repos","events_url":"https://api.github.com/users/azat-co/events{/privacy}","received_events_url":"https://api.github.com/users/azat-co/received_events","type":"User","site_admin":false},"body":"CC @AnnJohn @vicfriedman ","created_at":"2016-01-28T17:28:46Z","updated_at":"2016-02-11T18:43:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40da28b569eb5e2f15dacd987a496da49a01a603","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/1/commits","review_comments_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/1/comments","review_comment_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues/1/comments","statuses_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/statuses/d16f09808c60f3b2f0dfea0f7841b58c0838a461","head":{"label":"learn-co-curriculum:wip-master","ref":"wip-master","sha":"d16f09808c60f3b2f0dfea0f7841b58c0838a461","user":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"repo":{"id":50596137,"name":"node-modules-patterns","full_name":"learn-co-curriculum/node-modules-patterns","owner":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-curriculum/node-modules-patterns","description":"","fork":false,"url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns","forks_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/forks","keys_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/teams","hooks_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/hooks","issue_events_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/events","assignees_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/tags","blobs_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/languages","stargazers_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/stargazers","contributors_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/contributors","subscribers_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/subscribers","subscription_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/subscription","commits_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/merges","archive_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/downloads","issues_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/releases{/id}","deployments_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/deployments","created_at":"2016-01-28T16:23:55Z","updated_at":"2016-01-28T16:23:55Z","pushed_at":"2016-02-11T18:42:58Z","git_url":"git://github.com/learn-co-curriculum/node-modules-patterns.git","ssh_url":"git@github.com:learn-co-curriculum/node-modules-patterns.git","clone_url":"https://github.com/learn-co-curriculum/node-modules-patterns.git","svn_url":"https://github.com/learn-co-curriculum/node-modules-patterns","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"learn-co-curriculum:master","ref":"master","sha":"c7204a74efee8d44f74bdaaa9b540cdd18c15755","user":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"repo":{"id":50596137,"name":"node-modules-patterns","full_name":"learn-co-curriculum/node-modules-patterns","owner":{"login":"learn-co-curriculum","id":6208017,"avatar_url":"https://avatars.githubusercontent.com/u/6208017?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-curriculum","html_url":"https://github.com/learn-co-curriculum","followers_url":"https://api.github.com/users/learn-co-curriculum/followers","following_url":"https://api.github.com/users/learn-co-curriculum/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-curriculum/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-curriculum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-curriculum/subscriptions","organizations_url":"https://api.github.com/users/learn-co-curriculum/orgs","repos_url":"https://api.github.com/users/learn-co-curriculum/repos","events_url":"https://api.github.com/users/learn-co-curriculum/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-curriculum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-curriculum/node-modules-patterns","description":"","fork":false,"url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns","forks_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/forks","keys_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/teams","hooks_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/hooks","issue_events_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/events","assignees_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/tags","blobs_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/languages","stargazers_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/stargazers","contributors_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/contributors","subscribers_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/subscribers","subscription_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/subscription","commits_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/merges","archive_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/downloads","issues_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/releases{/id}","deployments_url":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/deployments","created_at":"2016-01-28T16:23:55Z","updated_at":"2016-01-28T16:23:55Z","pushed_at":"2016-02-11T18:42:58Z","git_url":"git://github.com/learn-co-curriculum/node-modules-patterns.git","ssh_url":"git@github.com:learn-co-curriculum/node-modules-patterns.git","clone_url":"https://github.com/learn-co-curriculum/node-modules-patterns.git","svn_url":"https://github.com/learn-co-curriculum/node-modules-patterns","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/1"},"html":{"href":"https://github.com/learn-co-curriculum/node-modules-patterns/pull/1"},"issue":{"href":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues/1"},"comments":{"href":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co-curriculum/node-modules-patterns/statuses/d16f09808c60f3b2f0dfea0f7841b58c0838a461"}}}}