Commit 22403765 authored by Janik Münzenberger's avatar Janik Münzenberger
Browse files

Edited configurations

parent d687c6db
......@@ -37,7 +37,7 @@
"cacheConfig": {
"strategy": "freshness",
"maxAge": "7d",
"timeout": "3s"
"timeout": "1s"
}
},{
"name": "history-api",
......@@ -53,7 +53,7 @@
"cacheConfig": {
"strategy": "freshness",
"maxAge": "7d",
"timeout": "2s"
"timeout": "1s"
}
}]
}
......@@ -15,7 +15,7 @@
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"backend": "set NODE_ENV=prod&& node ./src/backend/server.js",
"backend": "set NODE_ENV=production&& node ./src/backend/server.js",
"backend_dev": "set NODE_ENV=dev&& nodemon ./src/backend/server.js",
"backend_test": "set NODE_ENV=test&& mocha ./src/backend/test/ --timeout 15000 --exit",
"postinstall": "ng build --aot --prod && node ./src/service-worker/rollup.js"
......
import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import { SwPush } from '@angular/service-worker';
import { Router } from '@angular/router';
import { environment } from '../../environments/environment';
@Injectable()
export class NotificationService {
readonly VAPID_PUBLIC_KEY = 'BNaGf2POUom9qpnI45OSE8gmzjeqdvk-4HoV7Is-3RjPeCWMtgcukwEVPp0K2xMdfmSrGCS2be5rFIYX2qRwoEc';
readonly VAPID_PUBLIC_KEY = environment.PUBLIC_VAPID_KEY;
subscription: PushSubscription;
constructor(private swPush: SwPush, private router: Router) { }
......@@ -21,6 +22,4 @@ export class NotificationService {
})
.catch(err => console.error(err));
}
}
......@@ -4,14 +4,11 @@
"base_url": "https://psehda.herokuapp.com",
"api": {
"url": "https://spacenus-api.azurewebsites.net",
"api_key": "Tp5KoPMzRQcXsnx",
"reload_timer": 2000,
"reload_counter": 5
"api_key": "Tp5KoPMzRQcXsnx"
},
"timer": {
"plants": 86400000,
"diseases": 86400000,
"last_update": "25.04.2018"
"diseases": 86400000
},
"auth": {
"maxAge": 360000,
......
{
"port": 80,
"base_url": "https://psehda.herokuapp.com",
"timer": {
"plants": 86400000,
"diseases": 86400000
},
"auth": {
"maxAge": 360000,
"stayLoggedIn": 3600000,
"secret": "4f9fd85e-489d-11e8-842f-0ed4f8927186"
},
"publicVapidKey": "BNaGf2POUom9qpnI45OSE8gmzjeqdvk-4HoV7Is-3RjPeCWMtgcukwEVPp0K2xMdfmSrGCS2be5rFIYX2qRwoEc",
"privateVapidKey": "X_n9QwtF8HHcoFpeL8ZYw3WD0FOErvowKUFKb8q1dGw"
}
\ No newline at end of file
export const environment = {
production: true,
API_HOST: ''
API_HOST: '',
PUBLIC_VAPID_KEY: "BNaGf2POUom9qpnI45OSE8gmzjeqdvk-4HoV7Is-3RjPeCWMtgcukwEVPp0K2xMdfmSrGCS2be5rFIYX2qRwoEc"
};
......@@ -5,5 +5,6 @@
export const environment = {
production: false,
API_HOST: 'http://localhost:3000'
API_HOST: 'http://localhost:3000',
PUBLIC_VAPID_KEY: "BNaGf2POUom9qpnI45OSE8gmzjeqdvk-4HoV7Is-3RjPeCWMtgcukwEVPp0K2xMdfmSrGCS2be5rFIYX2qRwoEc"
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment