Add service worker for application caching
@ -0,0 +1,29 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
|
||||
"index": "/index.html",
|
||||
"assetGroups": [
|
||||
{
|
||||
"name": "app",
|
||||
"installMode": "prefetch",
|
||||
"resources": {
|
||||
"files": [
|
||||
"/favicon.ico",
|
||||
"/index.html",
|
||||
"/manifest.webmanifest",
|
||||
"/*.css",
|
||||
"/*.js"
|
||||
]
|
||||
}
|
||||
}, {
|
||||
"name": "assets",
|
||||
"installMode": "lazy",
|
||||
"updateMode": "prefetch",
|
||||
"resources": {
|
||||
"files": [
|
||||
"/assets/**",
|
||||
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {APOLLO_OPTIONS, ApolloModule} from 'apollo-angular';
|
||||
import {HttpLink, HttpLinkModule} from 'apollo-angular-link-http';
|
||||
import {InMemoryCache} from 'apollo-cache-inmemory';
|
||||
|
||||
const uri = 'https://o5x5jzoo7z.sse.codesandbox.io/graphql';
|
||||
|
||||
// 'https://greenvironment.net/graphql:443'; // <-- add the URL of the GraphQL server here
|
||||
export function createApollo(httpLink: HttpLink) {
|
||||
return {
|
||||
link: httpLink.create({uri}),
|
||||
cache: new InMemoryCache(),
|
||||
};
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
exports: [ApolloModule, HttpLinkModule],
|
||||
providers: [
|
||||
{
|
||||
provide: APOLLO_OPTIONS,
|
||||
useFactory: createApollo,
|
||||
deps: [HttpLink],
|
||||
},
|
||||
],
|
||||
})
|
||||
export class GraphQLModule {
|
||||
}
|
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 7.5 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "greenvironment",
|
||||
"short_name": "greenvironment",
|
||||
"theme_color": "#1976d2",
|
||||
"background_color": "#fafafa",
|
||||
"display": "standalone",
|
||||
"scope": "/",
|
||||
"start_url": "/",
|
||||
"icons": [
|
||||
{
|
||||
"src": "assets/icons/icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-128x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|