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 LogRocket from 'logrocket'; | |
| // Initialize LogRocket with your app ID | |
| LogRocket.init(<your_application_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 { applyMiddleware, createStore } from 'redux'; | |
| const store = createStore( | |
| reducer, // your app reducer | |
| applyMiddleware(middlewares, LogRocket.reduxMiddleware()), | |
| ); |
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
| LogRocket.identify('<user_id>', { | |
| name: '<name>', | |
| email: '<email>', | |
| // Add your own custom user variables here, ie: | |
| <custom_type>: '<custom_value' | |
| }); |
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
| fetch('http://example.com/todos') | |
| .then(function(response) { | |
| // some data processing | |
| const first_todo = response.todos[0].text; | |
| return first_todo; | |
| }) | |
| .then(function(myJson) { | |
| console.log(JSON.stringify(myJson)); | |
| }); |
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
| docker run -d --name dd-agent -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -e DD_API_KEY=<your-api-key> datadog/agent:latest |
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
| docker run -d -v /var/run/docker.sock:/var/run/docker.sock:ro \ | |
| -v /proc/:/host/proc/:ro \ | |
| -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \ | |
| -e DD_API_KEY=<YOUR_API_KEY> \ | |
| -e DD_APM_ENABLED=true \ | |
| datadog/agent:latest |
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 tracer = require('dd-trace').init({ | |
| hostname: '<host-name>', | |
| port: 8126, | |
| debug: true | |
| }); | |
| tracer.use('express'); |
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
| require("honeycomb-beeline")({ | |
| writeKey: "<your-write-key>", | |
| dataset: "node-js" | |
| // ... additional optional configuration ... | |
| }); |
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
| <template> | |
| <div> | |
| <h3>Authors</h3> | |
| <ul> | |
| <li v-for="item in author" :key="item.id"> | |
| <nuxt-link :to="`/article/${item.id}`"> | |
| {{ item.name }} | |
| </nuxt-link> | |
| </li> | |
| </ul> |
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 client from './src/apollo' | |
| import {GET_AUTHOR, GET_ARTICLE} from './src/graphql/queries' | |
| export default { | |
| getSiteData: () => ({ | |
| title: 'React Static with Hasura GraphQL', | |
| }), | |
| getRoutes: async () => { | |
| const { | |
| data: { author }, |