Social network for developers
It would also be worth adding your default.json config file to .gitignore
If git has been previously tracking your default.json file then...
git rm --cached config/default.jsonThen add your token to the config file and confirm that the file is untracked with git status before pushing to GitHub.
You'll also need to change the options object in routes/api/profile.js where we make the request to the GitHub API to...
const options = {
uri: encodeURI(
`https://api.github.com/users/${req.params.username}/repos?per_page=5&sort=created:asc`
),
method: 'GET',
headers: {
'user-agent': 'node.js',
Authorization: `token ${config.get('githubToken')}`
}
};{
"mongoURI": "<your_mongoDB_Atlas_uri_with_credentials>",
"jwtSecret": "secret",
"githubToken": ""
}
npm installcd client
npm installnpm run devcd client
npm run build