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
| # ---- Base Node ---- | |
| FROM mhart/alpine-node:10 AS base | |
| # install node | |
| RUN apk add --no-cache nodejs-current | |
| # set working directory | |
| WORKDIR /root/nextApp | |
| # copy project file | |
| COPY package.json . | |
| COPY tsconfig.server.json . | |
| COPY .npmrc . |
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
| import { ApolloProvider } from '@apollo/react-hooks' | |
| import App from 'next/app' | |
| import React from 'react' | |
| import withApolloClient from './lib/with-apollo-client' | |
| class MyApp extends App { | |
| render () { | |
| const {Component, pageProps, apolloClient}: any = this.props | |
| return( | |
| <ApolloProvider client={apolloClient}> |
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
| import io.opentracing.Scope; | |
| import io.opentracing.ScopeManager; | |
| import io.opentracing.Span; | |
| import org.slf4j.MDC; | |
| import org.springframework.lang.Nullable; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.Objects; | |
| public class DiagnosticContextScopeManager implements ScopeManager { |
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
| import io.opentracing.Scope; | |
| import io.opentracing.ScopeManager; | |
| import io.opentracing.Span; | |
| import org.slf4j.MDC; | |
| import org.springframework.lang.Nullable; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.Objects; | |
| public class DiagnosticContextScopeManager implements ScopeManager { |
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
| import { useEffect, useState } from 'react' | |
| import { API, graphqlOperation } from 'aws-amplify' | |
| const ListTalks = ` | |
| query { | |
| listTalks { | |
| items { | |
| name | |
| description | |
| presenter { |
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
| import React, { Component } from 'react'; | |
| import { graphql } from 'react-apollo'; | |
| import { gql } from 'graphql-tools'; | |
| const QUERY = gql` | |
| query MatchesByDate($date: Int) { | |
| matches(date: $date) { | |
| id | |
| minute | |
| period |
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
| /** | |
| * server/dataSources/Auth.js | |
| * Auth implementation, it's not really a dataSource so it doesn't need to be here | |
| */ | |
| const { authenticate, createJwt } = require('../lib/passport'); | |
| const { ON_HTTPS } = require('../configs'); | |
| const ONE_MINUTE = 1000 * 60; | |
| const ONE_DAY = ONE_MINUTE * 60 * 24; | |
| const ONE_MONTH = ONE_DAY * 30; |
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
| // filename: components/CustomComponent/index.test.js | |
| import React from 'react'; | |
| // Don't use component actual name, in this way | |
| // when you rename the component, no test change is required | |
| import Component from './index'; | |
| describe(Component.name, () => { | |
| // Use SUD (system under test) component for the tests | |
| // in this way each test contains only the props, specific to this test |