This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
db.js
105 lines (96 loc) · 2.13 KB
/
db.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
const lodashId = require('lodash-id');
function addIds(entry) {
return { ...entry, id: lodashId.createId() };
}
const MEETUP_ENTRIES = [
{
name: 'Berlin.js',
location: 'co.up',
coordinates: {
latitude: '52.500330',
longitude: '13.419786'
},
description:
'Berlin.js is a montly meetup for everything around JavaScript',
time: '19:00',
day: 'Every 3rd Thursday',
nextMeetup: new Date(),
twitter: 'berlinjs',
url: 'https://www.meetup.com/Berlin-JS/'
},
{
name: 'Angular Berlin',
location: 'bitcrowd GmbH',
coordinates: {
latitude: '52.499892',
longitude: '13.425056'
},
description: 'A monthly meetup around AngularJS & Angular',
time: '19:00',
day: 'Every 2nd Wednesday',
nextMeetup: new Date(),
twitter: 'angular_berlin',
url: 'https://www.meetup.com/AngularJS-Meetup-Berlin/'
},
{
name: 'Ionic Berlin',
location: 'JustWatch GmbH',
coordinates: {
latitude: '52.512911',
longitude: '13.455111'
},
description: 'A quarterly meetup around Ionic & Stencil',
time: '19:00',
day: 'Irregularly Thursdays',
nextMeetup: new Date(),
twitter: 'IonicBerlin',
url: 'https://www.meetup.com/Ionic-Berlin/'
},
{
name: 'Ember Berlin',
location: 'kloeckner.i',
coordinates: {
latitude: '52.531530',
longitude: '13.383500'
},
description: 'A monthly meetup around Ember & Glimmer',
time: '19:00',
day: 'First Tuesday',
nextMeetup: new Date(),
twitter: 'emberliners',
url: 'https://www.meetup.com/Ember-js-Berlin/'
}
].map(addIds);
const MEETUP_KEY = 'meetups';
const MEETUP_MANDATORY_KEYS = [
'name',
'location',
'description',
'day',
'time'
];
const MEETUP_VALID_KEYS = [
'name',
'location',
'coordinates',
'description',
'time',
'day',
'nextMeetup',
'twitter'
];
const USER_KEY = 'users';
const DB_DEFAULTS = {
[MEETUP_KEY]: MEETUP_ENTRIES,
[USER_KEY]: []
};
const DB_PATH = '.data/db.json';
module.exports = {
MEETUP_ENTRIES,
MEETUP_KEY,
MEETUP_MANDATORY_KEYS,
MEETUP_VALID_KEYS,
USER_KEY,
DB_DEFAULTS,
DB_PATH
};