Skip to content

Application that lists github repositories for a given user, wrote to learn RxJS and Observables

License

Notifications You must be signed in to change notification settings

mszczepaniak/githubber

Repository files navigation

Introduction

Githubber - Application that lists github repositories for a given user

App is taking advantage of RXJS and Observables in Angular 2

Some of the features in the search :

  • Do not trigger the search request on every key stroke, wait until user stops typing

One should not trigger the search endpoint more often than needed. Basically one only wants to hit it once the user has stopped typing instead of with every keystroke. We need to call:

debounceTime(500)

500 is the value in miliseconds

  • Don’t trigger the same search query twice or more in a row It would be a waste of resources to send out another request for a search term that the application already shows the results for. Fortunately Rx helps with that. All what is needed to do to achieve the desired behavior is to call
distinctUntilChanged()

Technology stack:

WIP Protractor for E2E Tests

Live example

Installation

*Required:

Node.js NPM

Install packages:

npm install

Start

Start up the server: gulp or gulp serve-dev (default task)

The browser will popup and serve the application. Every changes to the file will refresh the browser automatically and it'll also compile your changed TypeScripts files to Javascript files.

Unit testing

Run the command

gulp test

and it'll compile all TypeScript files, start Karma, then remap Istanbul coverage so that it shows TypeScript coverage, not the transpiled Javascript coverage.

Production

All build tasks will run the gulp test, the bundle will only be created if the test passed.

You can create production build by running:

gulp build

or you can create production build and then serve it using live-server by running:

gulp serve-build

It uses SystemJS Builder to bundle the application so it's ready for production use

About

Application that lists github repositories for a given user, wrote to learn RxJS and Observables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published