chore: add api key in env
This commit is contained in:
Родитель
401f43d60d
Коммит
dcb3d6b6d4
|
@ -1,2 +1,3 @@
|
|||
node_modules/*
|
||||
build/
|
||||
build/
|
||||
.env
|
|
@ -16,6 +16,7 @@
|
|||
"@progress/kendo-theme-material": "^2.2.0",
|
||||
"apollo-boost": "^0.1.27",
|
||||
"bootstrap": "^4.3.0",
|
||||
"dotenv": "^6.2.0",
|
||||
"graphql": "^14.1.1",
|
||||
"graphql-tag": "^2.10.1",
|
||||
"hammerjs": "^2.0.8",
|
||||
|
|
|
@ -4,16 +4,12 @@ import ApolloClient from "apollo-boost";
|
|||
import { KendoGridContainer } from "./components/KendoGridContainer";
|
||||
import { TabStrip, TabStripTab } from '@progress/kendo-react-layout';
|
||||
|
||||
const FIRST = '45d4fb1c20';
|
||||
const SECOND = 'd4899858acd89f0';
|
||||
const THIRD = '8b673fdefda51d2';
|
||||
|
||||
const client = new ApolloClient({
|
||||
uri: "https://api.github.com/graphql",
|
||||
request: operation => {
|
||||
operation.setContext({
|
||||
headers: {
|
||||
Authorization: `bearer ${FIRST}${SECOND}${THIRD}`
|
||||
Authorization: `bearer ${process.env.REACT_APP_API_KEY}`
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -2,5 +2,5 @@ import React from 'react';
|
|||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
import './styles/main.scss';
|
||||
|
||||
require('dotenv').config();
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
Загрузка…
Ссылка в новой задаче