Added a search for Chromebook usage after a specific date. Removed references to the schema code which was not working. Ran into a deployment issue that requires I manually run sudo npm run install from the bundle/programs/server folder after deploying.
This commit is contained in:
32
server/CheckEnvironment.js
Normal file
32
server/CheckEnvironment.js
Normal file
@@ -0,0 +1,32 @@
|
||||
if(!process.env.MONGO_URL) {
|
||||
console.log("Must provide the MONGO_URL environment variable point to the district central's main database. Should be of the format: `mongodb://localhost:27017/DatabaseName` or `mongodb://user_name:password@host.domain.com,host2.domain.com,host3.domain.com/DatabaseName?replicaSet=set_name`.")
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
if(!process.env.MONGO_URL2) {
|
||||
console.log("Must provide the MONGO_URL2 environment variable pointing to the chromebook data collection dataset. Should be of the format: `mongodb://localhost:27017/DatabaseName` or `mongodb://user_name:password@host.domain.com,host2.domain.com,host3.domain.com/DatabaseName?replicaSet=set_name`.")
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
try {
|
||||
let settings = Assets.getText('settings.json');
|
||||
}
|
||||
catch(e) {
|
||||
console.log("Must have a /private/settings.json file with the following format:");
|
||||
console.log(`
|
||||
{
|
||||
"google": {
|
||||
"clientId": "xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
|
||||
"secret": "xxxxxxxxxxxxxxxxxxx",
|
||||
"loginStyle": "redirect",
|
||||
"scope": [
|
||||
"email",
|
||||
"https://www.googleapis.com/auth/plus.login",
|
||||
"https://www.googleapis.com/auth/contacts.readonly"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
`);
|
||||
process.exit(0);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
import './CheckEnvironment.js';
|
||||
import './DataCollection.js';
|
||||
import '../imports/api/';
|
||||
import './google-oauth.js';
|
||||
|
||||
Reference in New Issue
Block a user