forked from BeerAndCodeSeattle/BeerAndCode
-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap.js
139 lines (126 loc) · 2.63 KB
/
bootstrap.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
var mongoose = require('mongoose'),
models = require('./models'),
Person,
Project,
JobPost,
JobRequest;
mongoose.connect('mongodb://localhost:27017/bandc206-dev');
models.defineModels(
mongoose,
Project,
Person,
JobPost,
JobRequest,
function () {
Person = mongoose.model('Person');
JobPost = mongoose.model('JobPost');
JobRequest = mongoose.model('JobRequest');
});
var people = [];
/*
people.push({
name: 'Beau Simensen',
email: '',
irc: 'simensen',
twitter: 'kirkrynn',
github: 'simensen',
bio: 'My bio',
languages: ['html']
});
*/
people.push({
name: 'David Pierce',
email: 'david.dean.pierce@gmail.com',
irc: 'TheDahv',
twitter: 'TheDahv',
github: 'TheDahv',
bio: "Hi I'm David. I started **writing** code and drinking beer and it turned into Beer && Code",
languages: ['javascript', 'node', 'c#', 'jQuery', 'css']
});
people.push({
name : 'Dustin Venegas',
email : 'dustin.venegas@gmail.com',
irc : 'electricEmu',
twitter : 'dustinvenegas',
github : 'DustinVenegas',
bio : "venegas vio",
languages : ['javascript', 'node', 'c#', 'delphi', 'css']
});
/*
people.push({
name: "Jason",
email: '',
irc: "trafficone",
twitter: "Trafficone",
github: "trafficone",
bio: '',
languages : []
});
people.push({
name: "Scott Moak",
email: '',
irc: "smoak",
twitter: "smoakin",
github: "smoak",
bio : 'My Bio',
languages : []
});
people.push({
name: "Bill Fraser",
email: '',
irc: "graycode",
twitter: "graycode",
github: "wfraser",
bio: 'My Bio',
languages : []
});
people.push({
name: "Josh LaRosee",
email: '',
irc: "jlarosee",
twitter: "joshlarosee",
github: "halogencreative",
bio: 'My Bio',
languages : []
});
people.push({
name: "Paul Betts",
email: '',
irc: "bettsp",
twitter: "xpaulbettsx",
github: "xpaulbettsx",
bio: '',
languages:[]
});
people.push({
name: "Brandon Fallout",
email: '',
irc: "P4r4d0x",
twitter: "What's Twitter?",
github: "P4r4d0x42",
bio: 'My Bio',
languages: []
});
*/
for(var i=0; i<people.length; i++) {
var savePerson = function(dude) {
console.log('Checking ' + dude.email);
Person.findOne({ email:dude.email }, function (err, person) {
if(!person) {
var p = new Person();
p.name = dude.name;
p.email = dude.email;
p.irc = dude.irc;
p.twitter_nick = dude.twitter;
p.github_nick = dude.github;
p.bio = dude.bio;
p.languages = dude.languages;
p.projects = [],
p.active = true
p.save(function (err) {
if (err) { throw err; }
});
}
});
}(people[i]);
}