forked from javascript-tutorial/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial.js
More file actions
executable file
·85 lines (79 loc) · 1.88 KB
/
Copy pathtutorial.js
File metadata and controls
executable file
·85 lines (79 loc) · 1.88 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
74
75
76
77
78
79
80
81
82
83
84
85
'use strict';
const mongoose = require('mongoose');
let ids = [];
for (let i = 0; i < 10; i++) ids[i] = new mongoose.Types.ObjectId();
exports.Article = [
{
_id: ids[0],
title: "Article 1",
slug: "article-1",
content: "Content 1",
modified: new Date(2014, 0, 1),
githubLink: 'http://not.exists.com',
isFolder: true,
weight: 0
},
{
_id: ids[1],
title: "Article 2",
slug: "article-2",
content: "Content 2",
modified: new Date(2014, 0, 2),
githubLink: 'http://not.exists.com',
isFolder: true,
weight: 1
},
{
_id: ids[2],
title: "Article 1.1",
slug: "article-1.1",
content: "Content 1.1",
modified: new Date(2014, 0, 2),
isFolder: false,
weight: 0,
githubLink: 'http://not.exists.com',
parent: ids[0]
},
{
_id: ids[3],
title: "Article 1.2",
slug: "article-1.2",
content: "Content 1.2",
modified: new Date(2014, 0, 3),
isFolder: false,
weight: 1,
githubLink: 'http://not.exists.com',
parent: ids[0]
},
{
_id: ids[4],
title: "Article 2.1",
slug: "article-2.1",
content: "Content 2.1",
modified: new Date(2014, 0, 4),
isFolder: false,
githubLink: 'http://not.exists.com',
weight: 0,
parent: ids[1]
},
{
_id: ids[5],
title: "Article 2.2",
slug: "article-2.2",
content: "Content 2.2",
modified: new Date(2014, 0, 5),
isFolder: false,
githubLink: 'http://not.exists.com',
weight: 1,
parent: ids[1]
}
];
exports.Task = [{
_id: ids[6],
slug: 'task-1',
parent: ids[5],
weight: 0,
githubLink: 'http://not.exists.com',
content: 'Task 1 content',
title: 'Task 1'
}];