Social network for developers
This is a MERN stack application from the "MERN Stack Front To Back" course on Udemy. It is a small social network app that includes authentication, profiles and forum posts.
Since the course was published, GitHub has depreciated authentication via URL query parameters You can get an access token by following these instructions For this app we don't need to add any permissions so don't select any in the scopes. DO NOT SHARE ANY TOKENS THAT HAVE PERMISSIONS This would leave your account or repositories vulnerable, depending on permissions set.
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.json
Then 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 install
cd client
npm install
npm run dev
cd client
npm run build
Brad Traversy Traversy Media
2.0.0
This project is licensed under the MIT License