-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.js
45 lines (37 loc) · 947 Bytes
/
client.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
import {
Users
}
from "meteor-user-roles";
import {
Apimoons
}
from "/lib/collections/apimoons.js";
import {
Todos
}
from "/lib/collections/todos.js";
import {
Apiclients
}
from "/lib/collections/apiclients.js";
Meteor.startup(function() {
console.log("Client startup running at " + new Date().toISOString());
// read environment variables from Meteor.settings
if (Meteor.settings && Meteor.settings.env && _.isObject(Meteor.settings.env)) {
for (var variableName in Meteor.settings.env) {
process.env[variableName] = Meteor.settings.env[variableName];
}
}
// A hack to create Collections global which can be accessed on the browser easily
MyCollections = {};
MyCollections.Apimoons = Apimoons;
MyCollections.Todos = Todos;
MyCollections.Apiclients = Apiclients;
console.log(MyCollections);
let args = {
userIn: Meteor.userId(),
date: new Date(),
event: "login"
};
Meteor.call("connection_status", args);
});