-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimport.js
More file actions
73 lines (59 loc) · 1.11 KB
/
import.js
File metadata and controls
73 lines (59 loc) · 1.11 KB
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
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost');
// var Snippet = require('./Snippet.js');
var SnippetSchema = require('./snippet.schema.js');
var Snippet = mongoose.model('Snippet', SnippetSchema);
snippet = new Snippet({
id: 1,
image: "images/css-2.png",
answer: "css",
answerId: 2,
category: "languages",
difficulty: 1
});
snippet.save();
snippet = new Snippet({
id: 2,
image: "images/html-4.png",
answer: "html",
answerId: 1,
category: "languages",
difficulty: 1
});
snippet.save();
snippet = new Snippet({
id: 3,
image: "images/js-5.png",
answer: "js",
answerId: 3,
category: "languages",
difficulty: 1
});
snippet.save();
snippet = new Snippet({
id: 4,
image: "images/css-3.png",
answer: "css",
answerId: 2,
category: "languages",
difficulty: 1
});
snippet.save();
snippet = new Snippet({
id: 5,
image: "images/html-2.png",
answer: "html",
answerId: 1,
category: "languages",
difficulty: 1
});
snippet.save();
snippet = new Snippet({
id: 6,
image: "images/js-2.png",
answer: "js",
answerId: 3,
category: "languages",
difficulty: 1
});
snippet.save();