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 greet = (req, res) => { | |
| console.log('hello world from the emulator!'); | |
| res.send('ok google'); | |
| }; | |
| module.exports = { | |
| greet, | |
| }; |
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 p = new Promise( | |
| // this is called the "executor" | |
| (resolve, reject) => { | |
| console.log(1); | |
| resolve(2); | |
| console.log(3); | |
| } | |
| ); | |
| console.log(4); |
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
| kind: Deployment | |
| apiVersion: apps/v1beta1 | |
| metadata: | |
| name: _BRANCH_NAME-deployment | |
| labels: | |
| branchName: _BRANCH_NAME | |
| spec: | |
| replicas: 2 | |
| selector: | |
| matchLabels: |
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
| steps: | |
| - name: ubuntu | |
| id: generate-image-tag | |
| entrypoint: bash | |
| args: | |
| - '-c' | |
| - echo $(date) | md5sum | awk '{print $1}' > tag.txt | |
| - name: gcr.io/cloud-builders/docker | |
| id: docker-build-push |
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 updateCountryGraphqlRequest = async (countryId, happinessFactor, population) => { | |
| const query = ` | |
| mutation updateCountry ($countryId: ID!, $happinessFactor: Int!, $population: Int!) { | |
| updateCountry(id: $countryId, happinessFactor: $happinessFactor, population: $population) { id } | |
| } | |
| `; | |
| const variables = { | |
| countryId, | |
| happinessFactor, | |
| population, |
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 updateCountryFetch = async (countryId, happinessFactor, population) => { | |
| const query = JSON.stringify({ | |
| query: `mutation { | |
| updateCountry( | |
| id: "${countryId}" | |
| happinessFactor: ${happinessFactor} | |
| population: ${population}) { id } | |
| } | |
| ` | |
| }); |
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 {createNetworkInterface, ApolloClient, ApolloProvider} from 'react-apollo'; | |
| import {SubscriptionClient} from 'subscriptions-transport-ws'; | |
| import {addGraphQLSubscriptions} from 'add-graphql-subscriptions'; | |
| let networkInterface = createNetworkInterface({uri: config.graphcool.simpleApi}); | |
| const wsClient = new SubscriptionClient(config.graphcool.subscriptions, { | |
| // See https://github.com/apollographql/subscriptions-transport-ws/issues/220 | |
| // for why the timeout should be set to 30000. | |
| timeout: 30000, | |
| reconnect: 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
| <Route path="/" component={App}> | |
| <IndexRoute component={Home} /> | |
| <Route path="example-path"> | |
| <IndexRoute component={ExampleLanding} /> | |
| </Route> | |
| <Route path="/apollo-path"> | |
| <IndexRoute component={ApolloLanding} /> | |
| </Route> | |
| <Route path="*" component={NotFoundPage} /> | |
| </Route> |
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
| DEBUG aws-sdk-go DEBUG: Request ecs/CreateService Details: | |
| DEBUG --- REQUEST POST-SIGN ----------------------------- | |
| DEBUG POST / HTTP/1.1 | |
| DEBUG Host: ecs.ap-southeast-2.amazonaws.com | |
| DEBUG User-Agent: terraform/0.7.1 aws-sdk-go/1.4.1 (go1.7; darwin; amd64) | |
| DEBUG Content-Length: 528 | |
| DEBUG Authorization: xxx | |
| DEBUG Content-Type: application/x-amz-json-1.1 | |
| DEBUG X-Amz-Date: 20160825T130303Z | |
| DEBUG X-Amz-Target: AmazonEC2ContainerServiceV20141113.CreateService |
NewerOlder