This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workbox.routing.registerRoute( | |
new RegExp('.css$'), | |
workbox.strategies.cacheFirst({ | |
cacheName: 'poc-cache-Stylesheets', | |
plugins: [ | |
new workbox.expiration.Plugin({ | |
maxAgeSeconds: 60 * 60 * 24 * 7, // cache for one week | |
maxEntries: 20, // only cache 20 request | |
purgeOnQuotaError: true, | |
}), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html body { | |
width: 100%; | |
height: 100%; | |
margin: 0px; | |
font-family: 'Roboto', sans-serif; | |
} | |
.main-header { | |
width: 100%; | |
position: fixed; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header class="main-header"> | |
<a href="index.html" class="main-header__brand"> | |
<img src="./images/nanny.png" alt="uHost - Your favorite hosting company"> | |
</a> | |
<nav class="main-nav"> | |
<ul class="main-nav__items"> | |
<li class="main-nav__item"> | |
<a href="packages/index.html">Account</a> | |
</li> | |
<li class="main-nav__item"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="grid-container"> | |
<div class="grid-columns"> | |
<div class="grid-column grid-col-4"> | |
<div class="grid-container_column--sagement ui secondary-img "> | |
<h2>Effective</h2> | |
<p>Every day hundreds of new ads.</p> | |
</div> | |
</div> | |
<div class="grid-column grid-col-4"> | |
<div class="grid-container_column--sagement ui secondary-img "> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.grid-container { | |
margin-top: 60px; | |
position: relative; | |
width: 970px; | |
margin: auto; | |
} | |
.grid-container .grid-columns { | |
text-align: left; | |
display: flex; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deploy | |
labels: | |
app: nginx-app | |
spec: | |
replicas: 3 | |
template: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Object = { | |
x : 90 | |
} | |
Object.defineProperty(Object,'getVal',{ | |
get : function(){ | |
return this.x; | |
}, | |
set : function(x){ | |
this.x = x; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const server = new ApolloServer({ | |
typeDefs, | |
resolvers, | |
context: ({ req }) => ({ | |
dbContext: new Database(global.connection), | |
me: getLoggedInUser(req), | |
}), | |
}); | |
server.applyMiddleware({ app }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { gql } = require('apollo-server-express'); | |
module.exports = gql` | |
extend type Query { | |
users: [User] | |
user(email: String!): User | |
me: User | |
} | |
type Response { | |
success: Boolean! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const resolvers = { | |
Query: { | |
users: (parent, args, { dbContext }) => { | |
return userController.getAllUsers(dbContext); | |
}, | |
user: (parent, { email }, { dbContext }) => { | |
return userController.getUserByEmail(dbContext, email); | |
}, | |
me: (parent, args, { me }) => me, | |
}, |