How sarojgrs/github-repository-viewer-assignment-backend works
Project type and purpose
• This is a backend‐only Node.js service written in TypeScript.
• It exposes HTTP endpoints on port 8080 to fetch GitHub user and repository data, using a personal access token.
File structure
• index.ts: application entry point, spins up an Express server.
• routes/githubRoutes.ts: defines HTTP routes and controllers.
• apiLibrary/apiLibrary.ts: service layer that makes outbound calls to the GitHub REST API.
• config/config.ts: loads environment variables (e.g. GITHUB_PERSONAL_ACCESS_TOKEN).
• modal/IUserModal.ts and modal/IRepoModal.ts: TypeScript interfaces for GitHub JSON responses.
• constants/repositoryType.ts: any enums or constant definitions.
• customError/customError.ts: central place for custom error classes and error handling logic.
• Supporting files: tsconfig.json, nodemon.json, package.json.
README for additional insights
• Startup sequence: yarn install → add .env → yarn build → yarn start.
• Service binds to http://localhost:8080.
• No frontend—pure API service.