A progressive Node.js framework for building efficient and scalable server-side applications, heavily inspired by Angular.
A simple NestJS application that uses the Github API to list user repositories.
While it is possible to use the endpoint without setting up the Github access token, it is advisable to use a github OAuth token if you find yourself being rate-limited by the Github API, which only allows a certain ammount of non-authenticated requests per IP.
- TOKEN = (github OAuth token)
You can load environment variables by creating a .env file at the root of the project.
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
The request endpoint can be found in http://localhost:3000/github/repositories . It is a GET request and it expects to receive a username param and the Accept header properly set up to application/json. You can find a curl example bellow.
curl -X GET \
'http://localhost:3000/github/repositories?username=ricardoferreirasilva' \
-H 'accept: application/json' \
-H 'cache-control: no-cache' \
-H 'postman-token: 3b64c5d0-f52d-41b6-ba12-213c356bc294' \
# unit tests
$ npm run test
# test coverage
$ npm run test:cov
# test end to end
$ npm run test:e2e
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.