Node.js, Express, React, Material-UI, Mocha
A tool for visualization of GitHub user profile statistics
-
Backend uses @octokit/rest library
-
TTL for node-cache is set to 24 hours to keep user's profile
-
Frontend uses React components that implement Google's Material Design (Note: Icons are here)
-
Uses concurrently to start both servers (express and create-react-app)
- Install dependencies
npm i && cd src/react && npm i
- Obtain a GitHub Access Token
- Run the local application
-
Add the GitHub Access Token to
src/config/development.json
-
Boot from the top-level directory (the server and the client)
npm start
-
Visit http://localhost:3000
- Run the debug server (uses nodemon)
npm run debug-server
- Other scripts
npm run server
npm run client
- Tests
npm test
- Test coverage is generated by Istanbul
-
Note to change default proxy value (http://localhost:3030) modify src/react/package.json
-
Run the production application
-
Obtain a GitHub Access Token and add it to
src/config/production.json
-
Update proxy in
src/react/package.json
if needed -
Run the app
export NODE_ENV=production cd src/react/ && npm build && cd ../.. NODE_ENV=production npm start
Note: Use GET method to retrieve data
Note: For a local copy browse to http://localhost:3030/api/
-
Call user/:username to GitHub user profile info
For example,
/api/user/mkora
-
Call clear/:username to clear user profile info from the cache
For example,
/api/clear/mkora
-
Call /api/limit to get rate limit for the obtained API key
For example,
/api/limit