A React project that uses GraphQL to retrieve Github repositories.
Create a .env file with your GITHUB_ACCESS_TOKEN and GITHUB_USERNAME, which are used in this example, within src/db.js:
const github = {
baseURL: "https://api.github.com/graphql",
username: process.env.REACT_APP_GITHUB_USERNAME,
headers: {
"Content-Type": "application/json",
Authorization: `bearer ${process.env.REACT_APP_GITHUB_ACCESS_TOKEN}`
}
}
export default github
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
Launches the test runner in the interactive watch mode.
Builds the app for production to the build
folder.