This is a sample TypeScript + Node.js & Express microservice that interacts with the GitHub API in order to retrieve Repositories + Branches information.
Node.js 18+ NPM 8+ Docker
SERVER_PORT
-> the port of the REST API serverGITHUB_BASE_URL
-> the GitHub API base url (default https://api.github.com)GITHUB_PERSONAL_ACCESS_TOKEN
-> your GitHub Personal Access Token; if empty, the GitHub's API rate limit will be lower
Run npm run build
to build the project, and generate the minified JavaScript bundle
Run npm start
Run npm test
docker build . -t github-microservice-nodejs:latest
docker run -d --name github-microservice-nodejs -e GITHUB_PERSONAL_ACCESS_TOKEN= -p 8080:8080 --rm github-microservice-nodejs:latest
See the Java sources' example
http://localhost:8080/swagger-ui
http://localhost:8080/health