Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Albin Geraud Kouatcho Nkuigwa
PSE_Projekt
Commits
22403765
Commit
22403765
authored
Jun 23, 2018
by
Janik Münzenberger
Browse files
Edited configurations
parent
d687c6db
Changes
7
Hide whitespace changes
Inline
Side-by-side
ngsw-config.json
View file @
22403765
...
...
@@ -37,7 +37,7 @@
"cacheConfig"
:
{
"strategy"
:
"freshness"
,
"maxAge"
:
"7d"
,
"timeout"
:
"
3
s"
"timeout"
:
"
1
s"
}
},{
"name"
:
"history-api"
,
...
...
@@ -53,7 +53,7 @@
"cacheConfig"
:
{
"strategy"
:
"freshness"
,
"maxAge"
:
"7d"
,
"timeout"
:
"
2
s"
"timeout"
:
"
1
s"
}
}]
}
package.json
View file @
22403765
...
...
@@ -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=prod
uction
&& 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"
...
...
src/app/services/notification.service.ts
View file @
22403765
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
));
}
}
src/backend/config/default.json
View file @
22403765
...
...
@@ -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
,
...
...
src/backend/config/production.json
0 → 100644
View file @
22403765
{
"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
src/environments/environment.prod.ts
View file @
22403765
export
const
environment
=
{
production
:
true
,
API_HOST
:
''
API_HOST
:
''
,
PUBLIC_VAPID_KEY
:
"
BNaGf2POUom9qpnI45OSE8gmzjeqdvk-4HoV7Is-3RjPeCWMtgcukwEVPp0K2xMdfmSrGCS2be5rFIYX2qRwoEc
"
};
src/environments/environment.ts
View file @
22403765
...
...
@@ -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
"
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment